Skip to content

Instantly share code, notes, and snippets.

@brentarias
Last active April 8, 2017 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brentarias/90eca56a45eac1acf44c871cf2f43d1f to your computer and use it in GitHub Desktop.
Save brentarias/90eca56a45eac1acf44c871cf2f43d1f to your computer and use it in GitHub Desktop.
PHX-AI-ML
#!/bin/bash
tail -n 10000 train.csv > validate.csv
head -n -10000 train.csv > train0.csv;mv train0.csv train.csv
wc -l train.csv;wc -l validate.csv;wc -l test.csv
## Pandas ##
import pandas as pd
TEST = pd.read_csv('test.csv',header=None)
TEST.shape
TEST.head()
TEST.columns.values
TEST.head().iloc[0:1]
TEST.head().iloc[0:1].values
type(TEST.head().iloc[0:1].values)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment