Created
July 23, 2013 14:10
-
-
Save randyzwitch/6062651 to your computer and use it in GitHub Desktop.
Julia, R, and Python language comparison: IO
This file contains hidden or 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: Read in 1987.csv from airline dataset into a dataframe | |
#No import statement needed to create a dataframe in R | |
airline1987 <- read.csv("~/airline/1987.csv") | |
dim(airline1987) | |
[1] 1311826 29 | |
#Python: use pandas to create a dataframe | |
import pandas as pd | |
airline1987 = pd.read_csv("/Users/randyzwitch/airline/1987.csv") | |
airline1987.shape | |
Out[7]: (1311826, 29) | |
#Julia: use DataFrames to create a dataframe | |
using DataFrames | |
airline1987 = readtable("/Users/randyzwitch/airline/1987.csv") | |
size(airline1987) | |
(1311826,29) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment