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
import pandas as pd | |
import numpy as np | |
from sys import exit | |
data = pd.read_csv('../../data/train.csv', sep=',') | |
train = data[['Address']] | |
train = train.loc[train['Address'].str.contains(' Block of ')] | |
train['count'] = 1 | |
train = train.groupby('Address').sum().reset_index() |
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
import pandas as pd | |
import numpy as np | |
data = pd.read_csv('../../data/train.csv', sep=',') | |
train = data[['PdDistrict']] | |
train['count'] = 1 | |
train = train.groupby('PdDistrict').sum().reset_index() | |
print train |
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
import pandas as pd | |
import numpy as np | |
import zipfile | |
import matplotlib.pyplot as pl | |
import seaborn as sns | |
from sys import exit | |
mapdata = np.loadtxt("../data/sf_map_copyright_openstreetmap_contributors.txt") | |
asp = mapdata.shape[0] * 1.0 / mapdata.shape[1] |
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
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from sys import exit | |
data = pd.read_csv('../data/locations/0.csv', sep = ',') | |
xyData = data[['X', 'Y', 'Category']] | |
allList = [ |
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
import pandas as pd | |
import numpy as np | |
from matplotlib import pyplot as plt | |
import seaborn as sns | |
from sys import exit | |
def cut(num): | |
if num < 10: | |
return 5 | |
elif num < 20: |
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
import pandas as pd | |
import numpy as np | |
from sys import exit | |
from sklearn import cross_validation | |
from sklearn import datasets | |
from sklearn import svm | |
from sklearn.naive_bayes import GaussianNB | |
data = pd.read_csv('../../data/improv/train1.csv') |
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
import pandas as pd | |
from sys import exit | |
import numpy as np | |
data = pd.read_csv('../../train.csv') | |
data = data[['Survived', 'Pclass', 'Sex', 'SibSp', 'Parch', 'Embarked']].dropna() | |
# male = 0 | |
# female = 1 | |
# S = 0 |
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
import pandas as pd | |
data = pd.read_csv('../data/train.csv', sep=',') | |
print data[(~data['Address'].str.contains(" Block of ")) & (~data['Address'].str.contains(" / "))].Address |
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
#CONDOR_HOST = reynolds-master.reynol.dz | |
# | |
#COLLECTOR_NAME = TEFPL at $(FULL_HOSTNAME)) | |
#START = $(CS_START) | |
#SUSPEND = $(CS_SUSPEND) | |
#CONTINUE = $(CS_CONTINUE) | |
#PREEMPT = $(CS_PREEMPT) | |
#KILL = $(CS_KILL) | |
# | |
#DAEMON_LIST = MASTER, SCHEDD, STARTD |
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
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import statsmodels.api as sm | |
import sys | |
# try whatever you want | |
element = 'hour' | |
df = pd.read_csv('../improved_data_set/turnstile_weather_v2.csv', index_col=0) |