path stringlengths 13 17 | screenshot_names listlengths 1 873 | code stringlengths 0 40.4k | cell_type stringclasses 1
value |
|---|---|---|---|
104120795/cell_4 | [
"text_plain_output_1.png"
] | import pandas as pd # read and wrangle dataframes
df = pd.read_csv('../input/glass/glass.csv')
features = df.columns[:-1].tolist()
print(df.shape) | code |
104120795/cell_23 | [
"image_output_5.png",
"image_output_7.png",
"image_output_4.png",
"image_output_8.png",
"image_output_6.png",
"image_output_3.png",
"image_output_2.png",
"image_output_1.png",
"image_output_9.png"
] | from collections import Counter
import numpy as np # linear algebra
import pandas as pd # read and wrangle dataframes
df = pd.read_csv('../input/glass/glass.csv')
features = df.columns[:-1].tolist()
df.dtypes
def outlier_hunt(df):
"""
Takes a dataframe df of features and returns a list of the indices
... | code |
104120795/cell_20 | [
"text_plain_output_1.png"
] | from collections import Counter
import matplotlib.pyplot as plt # visualization
import numpy as np # linear algebra
import pandas as pd # read and wrangle dataframes
import seaborn as sns # statistical visualizations and aesthetics
df = pd.read_csv('../input/glass/glass.csv')
features = df.columns[:-1].tolist()
... | code |
104120795/cell_6 | [
"image_output_5.png",
"image_output_7.png",
"image_output_4.png",
"image_output_8.png",
"image_output_6.png",
"image_output_3.png",
"image_output_2.png",
"image_output_1.png",
"image_output_9.png"
] | import pandas as pd # read and wrangle dataframes
df = pd.read_csv('../input/glass/glass.csv')
features = df.columns[:-1].tolist()
df.dtypes | code |
104120795/cell_18 | [
"text_html_output_1.png"
] | from collections import Counter
import matplotlib.pyplot as plt # visualization
import numpy as np # linear algebra
import pandas as pd # read and wrangle dataframes
import seaborn as sns # statistical visualizations and aesthetics
df = pd.read_csv('../input/glass/glass.csv')
features = df.columns[:-1].tolist()
... | code |
104120795/cell_28 | [
"text_plain_output_1.png",
"image_output_1.png"
] | from collections import Counter
import numpy as np # linear algebra
import pandas as pd # read and wrangle dataframes
df = pd.read_csv('../input/glass/glass.csv')
features = df.columns[:-1].tolist()
df.dtypes
def outlier_hunt(df):
"""
Takes a dataframe df of features and returns a list of the indices
... | code |
104120795/cell_8 | [
"text_plain_output_1.png"
] | import pandas as pd # read and wrangle dataframes
df = pd.read_csv('../input/glass/glass.csv')
features = df.columns[:-1].tolist()
df.dtypes
df.describe() | code |
104120795/cell_16 | [
"text_plain_output_1.png"
] | from collections import Counter
import numpy as np # linear algebra
import pandas as pd # read and wrangle dataframes
df = pd.read_csv('../input/glass/glass.csv')
features = df.columns[:-1].tolist()
df.dtypes
def outlier_hunt(df):
"""
Takes a dataframe df of features and returns a list of the indices
... | code |
104120795/cell_38 | [
"image_output_5.png",
"image_output_7.png",
"image_output_4.png",
"image_output_8.png",
"image_output_6.png",
"image_output_3.png",
"image_output_2.png",
"image_output_1.png",
"image_output_9.png"
] | from collections import Counter
import numpy as np # linear algebra
import pandas as pd # read and wrangle dataframes
df = pd.read_csv('../input/glass/glass.csv')
features = df.columns[:-1].tolist()
df.dtypes
def outlier_hunt(df):
"""
Takes a dataframe df of features and returns a list of the indices
... | code |
104120795/cell_31 | [
"image_output_1.png"
] | from collections import Counter
import matplotlib.pyplot as plt # visualization
import numpy as np # linear algebra
import pandas as pd # read and wrangle dataframes
import seaborn as sns # statistical visualizations and aesthetics
df = pd.read_csv('../input/glass/glass.csv')
features = df.columns[:-1].tolist()
... | code |
104120795/cell_14 | [
"text_html_output_1.png"
] | from collections import Counter
import numpy as np # linear algebra
import pandas as pd # read and wrangle dataframes
df = pd.read_csv('../input/glass/glass.csv')
features = df.columns[:-1].tolist()
df.dtypes
def outlier_hunt(df):
"""
Takes a dataframe df of features and returns a list of the indices
... | code |
104120795/cell_27 | [
"text_plain_output_1.png",
"image_output_1.png"
] | from collections import Counter
import matplotlib.pyplot as plt # visualization
import numpy as np # linear algebra
import pandas as pd # read and wrangle dataframes
import seaborn as sns # statistical visualizations and aesthetics
df = pd.read_csv('../input/glass/glass.csv')
features = df.columns[:-1].tolist()
... | code |
104120795/cell_37 | [
"text_plain_output_1.png"
] | from collections import Counter
import matplotlib.pyplot as plt # visualization
import numpy as np # linear algebra
import pandas as pd # read and wrangle dataframes
import seaborn as sns # statistical visualizations and aesthetics
df = pd.read_csv('../input/glass/glass.csv')
features = df.columns[:-1].tolist()
... | code |
104120795/cell_12 | [
"text_plain_output_1.png"
] | import matplotlib.pyplot as plt # visualization
import pandas as pd # read and wrangle dataframes
import seaborn as sns # statistical visualizations and aesthetics
df = pd.read_csv('../input/glass/glass.csv')
features = df.columns[:-1].tolist()
df.dtypes
for feat in features:
skew = df[feat].skew()
sns.di... | code |
104120795/cell_5 | [
"text_html_output_1.png"
] | import pandas as pd # read and wrangle dataframes
df = pd.read_csv('../input/glass/glass.csv')
features = df.columns[:-1].tolist()
df.head(15) | code |
104120795/cell_36 | [
"text_plain_output_1.png"
] | from collections import Counter
import numpy as np # linear algebra
import pandas as pd # read and wrangle dataframes
df = pd.read_csv('../input/glass/glass.csv')
features = df.columns[:-1].tolist()
df.dtypes
def outlier_hunt(df):
"""
Takes a dataframe df of features and returns a list of the indices
... | code |
2044446/cell_42 | [
"text_plain_output_1.png",
"image_output_1.png"
] | from wordcloud import WordCloud, STOPWORDS
import datetime
import matplotlib.pyplot as plt
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
pd.isnull(df).any()
toptweeps = df.groupby('username')[['tweet ']... | code |
2044446/cell_13 | [
"text_html_output_1.png"
] | import matplotlib.pyplot as plt
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
plt.figure(figsize=(12, 8))
sns.countplot(data=df, y='username') | code |
2044446/cell_25 | [
"text_html_output_1.png"
] | from wordcloud import WordCloud, STOPWORDS
import matplotlib.pyplot as plt
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
toptweeps = df.groupby('username')[['tweet ']].count()
toptweeps.sort_values('tweet... | code |
2044446/cell_4 | [
"text_html_output_1.png"
] | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
df.head() | code |
2044446/cell_34 | [
"text_html_output_1.png"
] | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
pd.isnull(df).any()
toptweeps = df.groupby('username')[['tweet ']].count()
toptweeps.sort_values('tweet ', ascending=False)[:10]
topretweets = df.groupby('username')[['retweets']].s... | code |
2044446/cell_23 | [
"text_plain_output_1.png",
"image_output_1.png"
] | from wordcloud import WordCloud, STOPWORDS
import matplotlib.pyplot as plt
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
toptweeps = df.groupby('username')[['tweet ']].count()
toptweeps.sort_values('tweet... | code |
2044446/cell_33 | [
"image_output_1.png"
] | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
toptweeps = df.groupby('username')[['tweet ']].count()
toptweeps.sort_values('tweet ', ascending=False)[:10]
topretweets = df.groupby('username')[['retweets']].sum()
topretweets.sort... | code |
2044446/cell_44 | [
"text_plain_output_1.png",
"image_output_1.png"
] | from wordcloud import WordCloud, STOPWORDS
import datetime
import matplotlib.pyplot as plt
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
pd.isnull(df).any()
toptweeps = df.groupby('username')[['tweet ']... | code |
2044446/cell_20 | [
"text_html_output_1.png"
] | from wordcloud import WordCloud, STOPWORDS
import matplotlib.pyplot as plt
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
toptweeps = df.groupby('username')[['tweet ']].count()
toptweeps.sort_values('tweet... | code |
2044446/cell_6 | [
"text_plain_output_1.png"
] | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
pd.isnull(df).any() | code |
2044446/cell_29 | [
"image_output_1.png"
] | from wordcloud import WordCloud, STOPWORDS
import matplotlib.pyplot as plt
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
toptweeps = df.groupby('username')[['tweet ']].count()
toptweeps.sort_values('tweet... | code |
2044446/cell_41 | [
"application_vnd.jupyter.stderr_output_1.png"
] | from wordcloud import WordCloud, STOPWORDS
import datetime
import matplotlib.pyplot as plt
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
pd.isnull(df).any()
toptweeps = df.groupby('username')[['tweet ']... | code |
2044446/cell_2 | [
"text_html_output_1.png"
] | from subprocess import check_output
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from wordcloud import WordCloud, STOPWORDS
import datetime
from subprocess import check_output
print(check_output(['ls', '../input']).decode('utf8')) | code |
2044446/cell_32 | [
"image_output_1.png"
] | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
toptweeps = df.groupby('username')[['tweet ']].count()
toptweeps.sort_values('tweet ', ascending=False)[:10]
topretweets = df.groupby('username')[['retweets']].sum()
topretweets.sort... | code |
2044446/cell_8 | [
"text_plain_output_1.png",
"image_output_1.png"
] | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
df.describe() | code |
2044446/cell_15 | [
"text_plain_output_1.png"
] | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
toptweeps = df.groupby('username')[['tweet ']].count()
toptweeps.sort_values('tweet ', ascending=False)[:10] | code |
2044446/cell_17 | [
"text_plain_output_1.png"
] | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
toptweeps = df.groupby('username')[['tweet ']].count()
toptweeps.sort_values('tweet ', ascending=False)[:10]
topretweets = df.groupby('username')[['retweets']].sum()
topretweets.sort... | code |
2044446/cell_35 | [
"text_html_output_1.png"
] | from wordcloud import WordCloud, STOPWORDS
import matplotlib.pyplot as plt
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
pd.isnull(df).any()
toptweeps = df.groupby('username')[['tweet ']].count()
toptwee... | code |
2044446/cell_10 | [
"text_plain_output_1.png"
] | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
df[df['retweets'] == 79537] | code |
2044446/cell_27 | [
"text_html_output_1.png"
] | from wordcloud import WordCloud, STOPWORDS
import matplotlib.pyplot as plt
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
toptweeps = df.groupby('username')[['tweet ']].count()
toptweeps.sort_values('tweet... | code |
2044446/cell_37 | [
"text_html_output_1.png"
] | from wordcloud import WordCloud, STOPWORDS
import datetime
import matplotlib.pyplot as plt
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
pd.isnull(df).any()
toptweeps = df.groupby('username')[['tweet ']... | code |
2044446/cell_5 | [
"text_html_output_1.png"
] | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_excel('../input/tweets.xlsx', sheet_name='tweets')
df.info() | code |
88075343/cell_21 | [
"text_html_output_1.png"
] | import matplotlib.pyplot as plt
import os
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import numpy as np
import pandas as pd
import os
df = pd.read_csv('../input/sales-dataset/Sales_April_2019.csv')
files = [file for file in os.listdir('../input/sales-dataset')]
df = pd.DataFrame()
for f... | code |
88075343/cell_30 | [
"text_html_output_1.png"
] | import os
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import numpy as np
import pandas as pd
import os
df = pd.read_csv('../input/sales-dataset/Sales_April_2019.csv')
files = [file for file in os.listdir('../input/sales-dataset')]
df = pd.DataFrame()
for file in files:
df1 = pd.read_c... | code |
88075343/cell_6 | [
"text_html_output_1.png"
] | import os
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import numpy as np
import pandas as pd
import os
df = pd.read_csv('../input/sales-dataset/Sales_April_2019.csv')
files = [file for file in os.listdir('../input/sales-dataset')]
df = pd.DataFrame()
for file in files:
df1 = pd.read_c... | code |
88075343/cell_2 | [
"text_html_output_1.png"
] | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_csv('../input/sales-dataset/Sales_April_2019.csv')
df.head() | code |
88075343/cell_19 | [
"text_plain_output_1.png"
] | import os
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import numpy as np
import pandas as pd
import os
df = pd.read_csv('../input/sales-dataset/Sales_April_2019.csv')
files = [file for file in os.listdir('../input/sales-dataset')]
df = pd.DataFrame()
for file in files:
df1 = pd.read_c... | code |
88075343/cell_1 | [
"text_plain_output_1.png"
] | import os
import numpy as np
import pandas as pd
import os
for dirname, _, filenames in os.walk('/kaggle/input'):
for filename in filenames:
print(os.path.join(dirname, filename)) | code |
88075343/cell_7 | [
"image_output_1.png"
] | import os
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import numpy as np
import pandas as pd
import os
df = pd.read_csv('../input/sales-dataset/Sales_April_2019.csv')
files = [file for file in os.listdir('../input/sales-dataset')]
df = pd.DataFrame()
for file in files:
df1 = pd.read_c... | code |
88075343/cell_28 | [
"image_output_1.png"
] | import os
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import numpy as np
import pandas as pd
import os
df = pd.read_csv('../input/sales-dataset/Sales_April_2019.csv')
files = [file for file in os.listdir('../input/sales-dataset')]
df = pd.DataFrame()
for file in files:
df1 = pd.read_c... | code |
88075343/cell_15 | [
"text_html_output_1.png"
] | import os
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import numpy as np
import pandas as pd
import os
df = pd.read_csv('../input/sales-dataset/Sales_April_2019.csv')
files = [file for file in os.listdir('../input/sales-dataset')]
df = pd.DataFrame()
for file in files:
df1 = pd.read_c... | code |
88075343/cell_24 | [
"text_html_output_1.png"
] | import os
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import numpy as np
import pandas as pd
import os
df = pd.read_csv('../input/sales-dataset/Sales_April_2019.csv')
files = [file for file in os.listdir('../input/sales-dataset')]
df = pd.DataFrame()
for file in files:
df1 = pd.read_c... | code |
88075343/cell_27 | [
"text_html_output_1.png"
] | import os
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import numpy as np
import pandas as pd
import os
df = pd.read_csv('../input/sales-dataset/Sales_April_2019.csv')
files = [file for file in os.listdir('../input/sales-dataset')]
df = pd.DataFrame()
for file in files:
df1 = pd.read_c... | code |
88075343/cell_5 | [
"text_html_output_1.png"
] | import os
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import numpy as np
import pandas as pd
import os
df = pd.read_csv('../input/sales-dataset/Sales_April_2019.csv')
files = [file for file in os.listdir('../input/sales-dataset')]
df = pd.DataFrame()
for file in files:
df1 = pd.read_c... | code |
128022780/cell_13 | [
"text_plain_output_1.png"
] | x = 4
x = 2
y = 902385873792631
z = -4938686
x = 2.1
y = 2.0
z = -45.69
x = 3 + 4j
y = 4j
z = -4j
print(type(x))
print(type(y)) | code |
128022780/cell_4 | [
"text_plain_output_1.png"
] | x = 4
print(type(x)) | code |
128022780/cell_7 | [
"application_vnd.jupyter.stderr_output_1.png"
] | x = 4
x = 2
y = 902385873792631
z = -4938686
print(type(x))
print(type(y))
print(type(z)) | code |
128022780/cell_18 | [
"text_plain_output_1.png"
] | import random
import random
print(random.randrange(1, 1)) | code |
128022780/cell_16 | [
"text_plain_output_1.png"
] | x = 4
x = 2
y = 902385873792631
z = -4938686
x = 2.1
y = 2.0
z = -45.69
x = 3 + 4j
y = 4j
z = -4j
x = 1
y = 4.4
z = 1j
a = float(x)
b = int(y)
c = complex(x)
print(a)
print(b)
print(c)
print(type(a))
print(type(b))
print(type(c)) | code |
128022780/cell_10 | [
"text_plain_output_1.png"
] | x = 4
x = 2
y = 902385873792631
z = -4938686
x = 2.1
y = 2.0
z = -45.69
print(type(x))
print(type(y))
print(type(x)) | code |
16124219/cell_21 | [
"text_plain_output_1.png"
] | import pandas as pd
df = pd.read_csv('../input/train.csv')
df_ = df.drop(['id', 'vendor_id', 'store_and_fwd_flag'], axis=1)
df_.head() | code |
16124219/cell_34 | [
"image_output_5.png",
"image_output_4.png",
"image_output_3.png",
"image_output_2.png",
"image_output_1.png"
] | import pandas as pd
df = pd.read_csv('../input/train.csv')
df_ = df.drop(['id', 'vendor_id', 'store_and_fwd_flag'], axis=1)
time = df_.set_index('trip_duration')
cols = ['passenger_count', 'Turno', 'Dia', 'Mês', 'Dia_Semana']
df_.drop(['dropoff_datetime', 'pickup_datetime', 'Hora', 'Data'], axis=1, inplace=True)
d... | code |
16124219/cell_40 | [
"text_html_output_1.png"
] | import numpy as np
import pandas as pd
df = pd.read_csv('../input/train.csv')
df_ = df.drop(['id', 'vendor_id', 'store_and_fwd_flag'], axis=1)
time = df_.set_index('trip_duration')
cols = ['passenger_count', 'Turno', 'Dia', 'Mês', 'Dia_Semana']
df_.drop(['dropoff_datetime', 'pickup_datetime', 'Hora', 'Data'], axis... | code |
16124219/cell_65 | [
"text_plain_output_1.png"
] | from sklearn.ensemble import GradientBoostingRegressor
from sklearn.ensemble import RandomForestRegressor
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error
from sklearn.metrics import mean_squared_log_error
from sklearn.tree import DecisionTreeRegressor
import numpy ... | code |
16124219/cell_11 | [
"text_html_output_1.png"
] | import pandas as pd
df = pd.read_csv('../input/train.csv')
df_ = df.drop(['id', 'vendor_id', 'store_and_fwd_flag'], axis=1)
df_.head() | code |
16124219/cell_60 | [
"text_plain_output_1.png"
] | from sklearn.ensemble import GradientBoostingRegressor
from sklearn.ensemble import RandomForestRegressor
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error
from sklearn.metrics import mean_squared_log_error
from sklearn.tree import DecisionTreeRegressor
import numpy ... | code |
16124219/cell_64 | [
"text_plain_output_1.png"
] | from sklearn.ensemble import GradientBoostingRegressor
from sklearn.ensemble import RandomForestRegressor
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error
from sklearn.metrics import mean_squared_log_error
from sklearn.tree import DecisionTreeRegressor
import numpy ... | code |
16124219/cell_7 | [
"text_plain_output_1.png"
] | import pandas as pd
df = pd.read_csv('../input/train.csv')
df.head() | code |
16124219/cell_45 | [
"text_plain_output_1.png"
] | import numpy as np
import pandas as pd
import seaborn as sns
df = pd.read_csv('../input/train.csv')
df_ = df.drop(['id', 'vendor_id', 'store_and_fwd_flag'], axis=1)
time = df_.set_index('trip_duration')
cols = ['passenger_count', 'Turno', 'Dia', 'Mês', 'Dia_Semana']
df_.drop(['dropoff_datetime', 'pickup_datetime'... | code |
16124219/cell_58 | [
"text_plain_output_1.png"
] | import xgboost as xgb
dtrain = xgb.DMatrix(X_train, label=y_train)
dtest = xgb.DMatrix(X_test, label=y_test)
watchlist = [(dtrain, 'train'), (dtest, 'valid')]
xgb_pars = {'min_child_weight': 10, 'eta': 0.03, 'colsample_bytree': 0.3, 'max_depth': 10, 'subsample': 0.8, 'lambda': 0.5, 'nthread': -1, 'booster': 'gbtree'... | code |
16124219/cell_8 | [
"text_plain_output_1.png"
] | import pandas as pd
df = pd.read_csv('../input/train.csv')
print(df.shape) | code |
16124219/cell_47 | [
"image_output_1.png"
] | X_train | code |
16124219/cell_66 | [
"text_plain_output_1.png"
] | from sklearn.ensemble import GradientBoostingRegressor
from sklearn.ensemble import RandomForestRegressor
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error
from sklearn.metrics import mean_squared_log_error
from sklearn.tree import DecisionTreeRegressor
import numpy ... | code |
16124219/cell_43 | [
"text_plain_output_1.png"
] | from sklearn.preprocessing import StandardScaler
import numpy as np
import pandas as pd
df = pd.read_csv('../input/train.csv')
df_ = df.drop(['id', 'vendor_id', 'store_and_fwd_flag'], axis=1)
time = df_.set_index('trip_duration')
cols = ['passenger_count', 'Turno', 'Dia', 'Mês', 'Dia_Semana']
df_.drop(['dropoff_d... | code |
16124219/cell_46 | [
"text_html_output_1.png"
] | import numpy as np
import pandas as pd
import seaborn as sns
df = pd.read_csv('../input/train.csv')
df_ = df.drop(['id', 'vendor_id', 'store_and_fwd_flag'], axis=1)
time = df_.set_index('trip_duration')
cols = ['passenger_count', 'Turno', 'Dia', 'Mês', 'Dia_Semana']
df_.drop(['dropoff_datetime', 'pickup_datetime'... | code |
16124219/cell_24 | [
"text_html_output_1.png"
] | import pandas as pd
df = pd.read_csv('../input/train.csv')
df_ = df.drop(['id', 'vendor_id', 'store_and_fwd_flag'], axis=1)
time = df_.set_index('trip_duration')
cols = ['passenger_count', 'Turno', 'Dia', 'Mês', 'Dia_Semana']
for c in cols:
plt.figure()
plt.title(c)
time[c].plot(kind='hist')
plt.show... | code |
16124219/cell_22 | [
"text_html_output_1.png"
] | import pandas as pd
df = pd.read_csv('../input/train.csv')
df_ = df.drop(['id', 'vendor_id', 'store_and_fwd_flag'], axis=1)
df_['passenger_count'].unique() | code |
16124219/cell_53 | [
"text_html_output_1.png"
] | from sklearn.ensemble import GradientBoostingRegressor
from sklearn.ensemble import RandomForestRegressor
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error
from sklearn.metrics import mean_squared_log_error
from sklearn.tree import DecisionTreeRegressor
import numpy ... | code |
16124219/cell_27 | [
"text_plain_output_1.png"
] | import pandas as pd
df = pd.read_csv('../input/train.csv')
df_ = df.drop(['id', 'vendor_id', 'store_and_fwd_flag'], axis=1)
time = df_.set_index('trip_duration')
cols = ['passenger_count', 'Turno', 'Dia', 'Mês', 'Dia_Semana']
df_.drop(['dropoff_datetime', 'pickup_datetime', 'Hora', 'Data'], axis=1, inplace=True)
d... | code |
16124219/cell_37 | [
"text_html_output_1.png"
] | import numpy as np
import pandas as pd
df = pd.read_csv('../input/train.csv')
df_ = df.drop(['id', 'vendor_id', 'store_and_fwd_flag'], axis=1)
time = df_.set_index('trip_duration')
cols = ['passenger_count', 'Turno', 'Dia', 'Mês', 'Dia_Semana']
df_.drop(['dropoff_datetime', 'pickup_datetime', 'Hora', 'Data'], axis... | code |
16111538/cell_9 | [
"text_html_output_1.png"
] | import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
train = pd.read_csv('../input/train.csv')
test = pd.read_csv('../input/test.csv')
train.reset_index(drop=True, inplace=True)
train['SalePrice'] = np.log1p(train['SalePrice'])
train['SalePrice'].hist(bins=50)
y ... | code |
16111538/cell_6 | [
"text_plain_output_1.png",
"image_output_1.png"
] | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
train = pd.read_csv('../input/train.csv')
test = pd.read_csv('../input/test.csv')
test.describe() | code |
16111538/cell_7 | [
"image_output_1.png"
] | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
train = pd.read_csv('../input/train.csv')
test = pd.read_csv('../input/test.csv')
train['SalePrice'].hist(bins=50) | code |
16111538/cell_10 | [
"text_html_output_1.png"
] | import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
train = pd.read_csv('../input/train.csv')
test = pd.read_csv('../input/test.csv')
train.reset_index(drop=True, inplace=True)
train['SalePrice'] = np.log1p(train['SalePrice'])
y = train['SalePrice'].reset_index(... | code |
16111538/cell_5 | [
"text_html_output_1.png"
] | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
train = pd.read_csv('../input/train.csv')
test = pd.read_csv('../input/test.csv')
train.describe() | code |
121150515/cell_9 | [
"text_plain_output_1.png"
] | from sklearn.model_selection import train_test_split,cross_val_score
from sklearn.tree import DecisionTreeRegressor
from sklearn.tree import DecisionTreeRegressor
dt = DecisionTreeRegressor()
cross_val_score(dt, X, y, cv=5).mean() | code |
121150515/cell_4 | [
"text_plain_output_1.png"
] | import pandas as pd
import seaborn as sns
train = pd.read_csv('/kaggle/input/playground-series-s3e9/train.csv', index_col='id')
test = pd.read_csv('/kaggle/input/playground-series-s3e9/test.csv', index_col='id')
submission = pd.read_csv('/kaggle/input/playground-series-s3e9/sample_submission.csv', index_col='id')
he... | code |
121150515/cell_11 | [
"text_plain_output_1.png"
] | from sklearn.ensemble import RandomForestRegressor
from sklearn.model_selection import train_test_split,cross_val_score
from sklearn.ensemble import RandomForestRegressor
rf = RandomForestRegressor(max_depth=6, random_state=73, n_estimators=90)
print(cross_val_score(rf, X, y, cv=5).mean()) | code |
121150515/cell_7 | [
"text_plain_output_1.png"
] | from sklearn.linear_model import RidgeCV
from sklearn.linear_model import RidgeCV
ridge = RidgeCV(cv=5).fit(X, y)
ridge.score(X, y) | code |
121150515/cell_8 | [
"text_plain_output_1.png"
] | from sklearn.linear_model import LassoCV
from sklearn.linear_model import LassoCV
lasso = LassoCV(cv=5).fit(X, y)
lasso.score(X, y) | code |
121150515/cell_17 | [
"text_plain_output_1.png"
] | from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split,cross_val_score
from sklearn.linear_model import LinearRegression
lr = LinearRegression()
cross_val_score(lr, X, y, cv=5).mean() | code |
121150515/cell_10 | [
"image_output_1.png"
] | from sklearn.model_selection import train_test_split,cross_val_score
from sklearn.neighbors import KNeighborsRegressor
from sklearn.neighbors import KNeighborsRegressor
knn = KNeighborsRegressor(n_neighbors=9)
cross_val_score(knn, X, y, cv=5).mean() | code |
121150515/cell_12 | [
"text_plain_output_1.png"
] | from sklearn.model_selection import train_test_split,cross_val_score
import xgboost as xgb
model = xgb.XGBRegressor(max_depth=5, n_estimators=10, random_state=73)
print(cross_val_score(model, X, y, cv=5).mean()) | code |
32065347/cell_6 | [
"text_plain_output_1.png",
"image_output_1.png"
] | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
spotify_filepath = '../input/data-for-datavis/spotify.csv'
spotify_data = pd.read_csv(spotify_filepath, index_col='Date', parse_dates=True)
spotify_data.sample(10) | code |
32065347/cell_1 | [
"text_plain_output_1.png"
] | import numpy as np
import pandas as pd
pd.plotting.register_matplotlib_converters()
import matplotlib.pyplot as plt
import seaborn as sns
import os
for dirname, _, filenames in os.walk('/kaggle/input'):
for filename in filenames:
print(os.path.join(dirname, filename)) | code |
32065347/cell_7 | [
"text_plain_output_1.png",
"image_output_1.png"
] | import matplotlib.pyplot as plt
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
sns.set_style('dark')
spotify_filepath = '../input/data-for-datavis/spotify.csv'
spotify_data = pd.read_csv(spotify_filepath, index_col='Date', parse_dates=True)
spotify_data.sample(10)
plt... | code |
32065347/cell_8 | [
"text_plain_output_1.png",
"image_output_1.png"
] | import matplotlib.pyplot as plt
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
sns.set_style('dark')
spotify_filepath = '../input/data-for-datavis/spotify.csv'
spotify_data = pd.read_csv(spotify_filepath, index_col='Date', parse_dates=True)
spotify_data.sample(10)
ign... | code |
32065347/cell_10 | [
"text_html_output_1.png"
] | import matplotlib.pyplot as plt
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
sns.set_style('dark')
spotify_filepath = '../input/data-for-datavis/spotify.csv'
spotify_data = pd.read_csv(spotify_filepath, index_col='Date', parse_dates=True)
spotify_data.sample(10)
ign... | code |
89142938/cell_3 | [
"text_plain_output_1.png"
] | def factorial(n):
result = 1
for i in range(1, n + 1):
result = result * i
return result
factorial(5) | code |
105180553/cell_4 | [
"application_vnd.jupyter.stderr_output_1.png"
] | from google.colab import drive
from google.colab import drive
drive.mount('/content/drive') | code |
128044935/cell_2 | [
"application_vnd.jupyter.stderr_output_1.png"
] | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
train_data = pd.read_csv('./train.csv')
train_data.head() | code |
128044935/cell_1 | [
"text_plain_output_1.png"
] | import os
import numpy as np
import pandas as pd
import os
for dirname, _, filenames in os.walk('/kaggle/input'):
for filename in filenames:
print(os.path.join(dirname, filename)) | code |
128049433/cell_21 | [
"text_plain_output_1.png"
] | from tensorflow.keras import models,layers
import tensorflow as tf
IMAGE_SIZE = (256, 256)
BATCH_SIZE = 32
CHANNELS = 3
EPOCHES = 100
dataset = tf.keras.preprocessing.image_dataset_from_directory('/kaggle/input/corn-or-maize-leaf-disease-dataset/data', shuffle=True, image_size=IMAGE_SIZE, batch_size=BATCH_SIZE)
def... | code |
128049433/cell_9 | [
"text_plain_output_1.png",
"image_output_1.png"
] | import tensorflow as tf
IMAGE_SIZE = (256, 256)
BATCH_SIZE = 32
CHANNELS = 3
EPOCHES = 100
dataset = tf.keras.preprocessing.image_dataset_from_directory('/kaggle/input/corn-or-maize-leaf-disease-dataset/data', shuffle=True, image_size=IMAGE_SIZE, batch_size=BATCH_SIZE)
class_names = dataset.class_names
class_names | code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.