This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Year | N.Amer | Europe | Asia | S.Amer | Oceania | Africa | Mid.Amer | |
---|---|---|---|---|---|---|---|---|
1951 | 45939 | 21574 | 2876 | 1815 | 1646 | 89 | 555 | |
1956 | 60423 | 29990 | 4708 | 2568 | 2366 | 1411 | 733 | |
1957 | 64721 | 32510 | 5230 | 2695 | 2526 | 1546 | 773 | |
1958 | 68484 | 35218 | 6662 | 2845 | 2691 | 1663 | 836 | |
1959 | 71799 | 37598 | 6856 | 3000 | 2868 | 1769 | 911 | |
1960 | 76036 | 40341 | 8220 | 3145 | 3054 | 1905 | 1008 | |
1961 | 79831 | 43173 | 9053 | 3338 | 3224 | 2005 | 1076 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ID":["1","2","3","4","5","6","7","8" ], | |
"Name":["Rick","Dan","Michelle","Ryan","Gary","Nina","Simon","Guru" ], | |
"Salary":["623.3","515.2","611","729","843.25","578","632.8","722.5" ], | |
"StartDate":[ "1/1/2012","9/23/2013","11/15/2014","5/11/2014","3/27/2015","5/21/2013","7/30/2013","6/17/2014"], | |
"Dept":[ "IT","Operations","IT","HR","Finance","IT","Operations","Finance"] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Welcome to our school website</title> | |
</head> | |
<body> | |
<h2>Our Innovative Teachers</h1> | |
<ul> | |
<li>Liam Nielson</li> | |
<li>Jack Dorsey</li> | |
<li>Reed Hastings</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<email> | |
<first> | |
<from>toy@datarockie</from> | |
<to>students@data-science-bootcamp.com</to> | |
<subject>Welcome to our course</subject> | |
<content>I hope you enjoy the class</content> | |
<date>16 January 2021</date> | |
</first> | |
<second> | |
<from>toy@datarockie</from> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## I've tried below codes and all failed the test | |
## none of these worked .. | |
stock = stock.drop_duplicates('item') | |
stock = stock.drop_duplicates('item').reset_index() | |
stock = stock.drop_duplicates('item').reset_index(drop=True) | |
stock = stock.drop_duplicates(['item']) | |
stock = stock.drop_duplicates(['item']).reset_index() | |
stock = stock.drop_duplicates(['item']).reset_index(drop=True) | |
stock = stock['item'].drop_duplicates() | |
stock = stock['item'].drop_duplicates().reset_index() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## ------------------------------------- | |
## Import Libraries -------------------- | |
## ------------------------------------- | |
library(dplyr) | |
library(readr) | |
library(lubridate) | |
library(tidyr) | |
library(DescTools) | |
## load dataset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## R version 3.6.1 | |
## Created by DataRockie 15 November 2019 | |
## load library | |
library(caret) | |
library(mlbench) | |
library(dplyr) | |
## load dataset | |
data("BostonHousing") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>This is my first webpage</title> | |
</head> | |
<body> | |
<h1>Hello World</h1> | |
<p>Let's learn web development in two months.</p> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## create example data | |
x <- 1:20 | |
y <- 35 + 5.5*x | |
## add some random noise to y | |
set.seed(99) | |
y <- y + rnorm(n = 20, mean = 2, sd = 5) | |
## create a data frame of xy | |
df <- data.frame(distance = x, fare = y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## select columns | |
df %>% | |
select(id, student_name, gender) | |
## filter rows | |
df %>% | |
select(id, student_name, gender) %>% | |
filter(gender == "M") | |
## sample rows n=30 |