path
stringlengths
13
17
screenshot_names
listlengths
1
873
code
stringlengths
0
40.4k
cell_type
stringclasses
1 value
73074336/cell_11
[ "text_plain_output_1.png" ]
import pandas as pd df = pd.read_csv('/kaggle/input/hotel-booking/hotel_booking.csv') df.shape df.columns df.isnull().sum() df.drop('company', inplace=True, axis=1) df df_Sort_by_adr = df.sort_values(by=['adr'], ascending=False)['name'] df_Sort_by_adr.dataFrame
code
73074336/cell_7
[ "text_html_output_1.png" ]
import pandas as pd df = pd.read_csv('/kaggle/input/hotel-booking/hotel_booking.csv') df.shape df.columns df.tail()
code
73074336/cell_8
[ "text_plain_output_1.png" ]
import pandas as pd df = pd.read_csv('/kaggle/input/hotel-booking/hotel_booking.csv') df.shape df.columns df.isnull().sum()
code
73074336/cell_3
[ "text_plain_output_1.png" ]
import pandas as pd df = pd.read_csv('/kaggle/input/hotel-booking/hotel_booking.csv') df.info()
code
73074336/cell_10
[ "text_plain_output_1.png" ]
import pandas as pd df = pd.read_csv('/kaggle/input/hotel-booking/hotel_booking.csv') df.shape df.columns df.isnull().sum() df.drop('company', inplace=True, axis=1) df df['country'].value_counts(sort=True)[:5]
code
73074336/cell_5
[ "text_html_output_1.png" ]
import pandas as pd df = pd.read_csv('/kaggle/input/hotel-booking/hotel_booking.csv') df.shape df.columns
code
106195752/cell_21
[ "text_plain_output_1.png" ]
import numpy as np import numpy as np import time import time import numpy as np x = np.random.random(100000000) start = time.time() sum(x) / len(x) start = time.time() np.mean(x) a = np.array([1, 2, 3, 4, 5]) b = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) c = np.array(['Hello', 'World']) print(c.dty...
code
106195752/cell_4
[ "text_plain_output_1.png" ]
pip install numpy
code
106195752/cell_23
[ "text_plain_output_1.png" ]
import numpy as np import numpy as np import time import time import numpy as np x = np.random.random(100000000) start = time.time() sum(x) / len(x) start = time.time() np.mean(x) a = np.array([1, 2, 3, 4, 5]) b = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) c = np.array(['Hello', 'World']) d = np.arr...
code
106195752/cell_30
[ "text_plain_output_1.png" ]
import numpy as np import numpy as np import time import time import numpy as np x = np.random.random(100000000) start = time.time() sum(x) / len(x) start = time.time() np.mean(x) a = np.array([1, 2, 3, 4, 5]) b = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) c = np.array(['Hello', 'World']) d = np.arr...
code
106195752/cell_33
[ "text_plain_output_1.png" ]
import numpy as np import numpy as np import time import time import numpy as np x = np.random.random(100000000) start = time.time() sum(x) / len(x) start = time.time() np.mean(x) a = np.array([1, 2, 3, 4, 5]) b = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) c = np.array(['Hello', 'World']) d = np.arr...
code
106195752/cell_20
[ "text_plain_output_1.png" ]
import numpy as np import numpy as np import time import time import numpy as np x = np.random.random(100000000) start = time.time() sum(x) / len(x) start = time.time() np.mean(x) a = np.array([1, 2, 3, 4, 5]) b = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) print('rank: ', b.ndim)
code
106195752/cell_29
[ "text_plain_output_1.png" ]
import numpy as np import numpy as np import time import time import numpy as np x = np.random.random(100000000) start = time.time() sum(x) / len(x) start = time.time() np.mean(x) a = np.array([1, 2, 3, 4, 5]) b = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) c = np.array(['Hello', 'World']) d = np.arr...
code
106195752/cell_26
[ "text_plain_output_1.png" ]
import numpy as np import numpy as np import time import time import numpy as np x = np.random.random(100000000) start = time.time() sum(x) / len(x) start = time.time() np.mean(x) a = np.array([1, 2, 3, 4, 5]) b = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) c = np.array(['Hello', 'World']) d = np.arr...
code
106195752/cell_19
[ "text_plain_output_1.png" ]
import numpy as np import numpy as np import time import time import numpy as np x = np.random.random(100000000) start = time.time() sum(x) / len(x) start = time.time() np.mean(x) a = np.array([1, 2, 3, 4, 5]) b = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) print(b.shape)
code
106195752/cell_18
[ "text_plain_output_1.png" ]
import numpy as np import numpy as np import time import time import numpy as np x = np.random.random(100000000) start = time.time() sum(x) / len(x) start = time.time() np.mean(x) a = np.array([1, 2, 3, 4, 5]) b = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) print(b)
code
106195752/cell_32
[ "text_plain_output_1.png" ]
import numpy as np import numpy as np import time import time import numpy as np x = np.random.random(100000000) start = time.time() sum(x) / len(x) start = time.time() np.mean(x) a = np.array([1, 2, 3, 4, 5]) b = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) c = np.array(['Hello', 'World']) d = np.arr...
code
106195752/cell_28
[ "text_plain_output_1.png" ]
import numpy as np import numpy as np import time import time import numpy as np x = np.random.random(100000000) start = time.time() sum(x) / len(x) start = time.time() np.mean(x) a = np.array([1, 2, 3, 4, 5]) b = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) c = np.array(['Hello', 'World']) d = np.arr...
code
106195752/cell_15
[ "text_plain_output_1.png" ]
import numpy as np import numpy as np import time import time import numpy as np x = np.random.random(100000000) start = time.time() sum(x) / len(x) start = time.time() np.mean(x) a = np.array([1, 2, 3, 4, 5]) print('rank: ', a.ndim)
code
106195752/cell_16
[ "text_plain_output_1.png" ]
import numpy as np import numpy as np import time import time import numpy as np x = np.random.random(100000000) start = time.time() sum(x) / len(x) start = time.time() np.mean(x) a = np.array([1, 2, 3, 4, 5]) print(a.shape)
code
106195752/cell_17
[ "text_plain_output_1.png" ]
import numpy as np import numpy as np import time import time import numpy as np x = np.random.random(100000000) start = time.time() sum(x) / len(x) start = time.time() np.mean(x) a = np.array([1, 2, 3, 4, 5]) print(a.dtype)
code
106195752/cell_31
[ "text_plain_output_1.png" ]
import numpy as np import numpy as np import time import time import numpy as np x = np.random.random(100000000) start = time.time() sum(x) / len(x) start = time.time() np.mean(x) a = np.array([1, 2, 3, 4, 5]) b = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) c = np.array(['Hello', 'World']) d = np.arr...
code
106195752/cell_24
[ "text_plain_output_1.png" ]
import numpy as np import numpy as np import time import time import numpy as np x = np.random.random(100000000) start = time.time() sum(x) / len(x) start = time.time() np.mean(x) a = np.array([1, 2, 3, 4, 5]) b = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) c = np.array(['Hello', 'World']) d = np.arr...
code
106195752/cell_14
[ "text_plain_output_1.png" ]
import numpy as np import numpy as np import time import time import numpy as np x = np.random.random(100000000) start = time.time() sum(x) / len(x) start = time.time() np.mean(x) a = np.array([1, 2, 3, 4, 5]) print(a) print(type(a))
code
106195752/cell_22
[ "text_plain_output_1.png" ]
import numpy as np import numpy as np import time import time import numpy as np x = np.random.random(100000000) start = time.time() sum(x) / len(x) start = time.time() np.mean(x) a = np.array([1, 2, 3, 4, 5]) b = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) c = np.array(['Hello', 'World']) d = np.arr...
code
106195752/cell_10
[ "text_plain_output_1.png" ]
import numpy as np import time import time import numpy as np x = np.random.random(100000000) start = time.time() sum(x) / len(x) print('using built-in python function: ', time.time() - start) start = time.time() np.mean(x) print('using NumPy: ', time.time() - start)
code
2022470/cell_21
[ "text_plain_output_1.png" ]
import pandas as pd df = pd.read_csv('../input/train.csv', encoding='ISO-8859-1', low_memory=False) df.columns.values
code
2022470/cell_25
[ "text_html_output_1.png" ]
import pandas as pd df = pd.read_csv('../input/train.csv', encoding='ISO-8859-1', low_memory=False) df.columns.values df['Age_band'] = 0 df.loc[df['Age'] <= 16, 'Age_band'] = 0 df.loc[(df['Age'] > 16) & (df['Age'] <= 32), 'Age_band'] = 1 df.loc[(df['Age'] > 32) & (df['Age'] <= 48), 'Age_band'] = 2 df.loc[(df['Age'] ...
code
2022470/cell_34
[ "text_plain_output_1.png", "image_output_1.png" ]
import matplotlib.pyplot as plt import pandas as pd import seaborn as sns df = pd.read_csv('../input/train.csv', encoding='ISO-8859-1', low_memory=False) df.columns.values df['Age_band'] = 0 df.loc[df['Age'] <= 16, 'Age_band'] = 0 df.loc[(df['Age'] > 16) & (df['Age'] <= 32), 'Age_band'] = 1 df.loc[(df['Age'] > 32)...
code
2022470/cell_23
[ "image_output_1.png" ]
import matplotlib.pyplot as plt import pandas as pd import seaborn as sns df = pd.read_csv('../input/train.csv', encoding='ISO-8859-1', low_memory=False) df.columns.values sns.countplot('Sex', hue='Survived', data=df) plt.show()
code
2022470/cell_33
[ "text_html_output_1.png" ]
import pandas as pd df = pd.read_csv('../input/train.csv', encoding='ISO-8859-1', low_memory=False) df.columns.values df['Age_band'] = 0 df.loc[df['Age'] <= 16, 'Age_band'] = 0 df.loc[(df['Age'] > 16) & (df['Age'] <= 32), 'Age_band'] = 1 df.loc[(df['Age'] > 32) & (df['Age'] <= 48), 'Age_band'] = 2 df.loc[(df['Age'] ...
code
2022470/cell_29
[ "text_html_output_1.png" ]
import pandas as pd df = pd.read_csv('../input/train.csv', encoding='ISO-8859-1', low_memory=False) df.columns.values df['Age_band'] = 0 df.loc[df['Age'] <= 16, 'Age_band'] = 0 df.loc[(df['Age'] > 16) & (df['Age'] <= 32), 'Age_band'] = 1 df.loc[(df['Age'] > 32) & (df['Age'] <= 48), 'Age_band'] = 2 df.loc[(df['Age'] ...
code
2022470/cell_39
[ "text_plain_output_1.png" ]
import matplotlib.pyplot as plt import pandas as pd import seaborn as sns df = pd.read_csv('../input/train.csv', encoding='ISO-8859-1', low_memory=False) df.columns.values df['Age_band'] = 0 df.loc[df['Age'] <= 16, 'Age_band'] = 0 df.loc[(df['Age'] > 16) & (df['Age'] <= 32), 'Age_band'] = 1 df.loc[(df['Age'] > 32)...
code
2022470/cell_26
[ "text_html_output_1.png" ]
import pandas as pd df = pd.read_csv('../input/train.csv', encoding='ISO-8859-1', low_memory=False) df.columns.values df['Age_band'] = 0 df.loc[df['Age'] <= 16, 'Age_band'] = 0 df.loc[(df['Age'] > 16) & (df['Age'] <= 32), 'Age_band'] = 1 df.loc[(df['Age'] > 32) & (df['Age'] <= 48), 'Age_band'] = 2 df.loc[(df['Age'] ...
code
2022470/cell_19
[ "text_html_output_1.png" ]
import pandas as pd df = pd.read_csv('../input/train.csv', encoding='ISO-8859-1', low_memory=False) df.head()
code
2022470/cell_32
[ "text_plain_output_1.png", "image_output_1.png" ]
import pandas as pd df = pd.read_csv('../input/train.csv', encoding='ISO-8859-1', low_memory=False) df.columns.values df['Age_band'] = 0 df.loc[df['Age'] <= 16, 'Age_band'] = 0 df.loc[(df['Age'] > 16) & (df['Age'] <= 32), 'Age_band'] = 1 df.loc[(df['Age'] > 32) & (df['Age'] <= 48), 'Age_band'] = 2 df.loc[(df['Age'] ...
code
2022470/cell_35
[ "application_vnd.jupyter.stderr_output_1.png" ]
import pandas as pd df = pd.read_csv('../input/train.csv', encoding='ISO-8859-1', low_memory=False) df.columns.values df['Age_band'] = 0 df.loc[df['Age'] <= 16, 'Age_band'] = 0 df.loc[(df['Age'] > 16) & (df['Age'] <= 32), 'Age_band'] = 1 df.loc[(df['Age'] > 32) & (df['Age'] <= 48), 'Age_band'] = 2 df.loc[(df['Age'] ...
code
2022470/cell_31
[ "text_html_output_1.png" ]
import pandas as pd df = pd.read_csv('../input/train.csv', encoding='ISO-8859-1', low_memory=False) df.columns.values df['Age_band'] = 0 df.loc[df['Age'] <= 16, 'Age_band'] = 0 df.loc[(df['Age'] > 16) & (df['Age'] <= 32), 'Age_band'] = 1 df.loc[(df['Age'] > 32) & (df['Age'] <= 48), 'Age_band'] = 2 df.loc[(df['Age'] ...
code
2022470/cell_27
[ "text_plain_output_1.png" ]
import pandas as pd df = pd.read_csv('../input/train.csv', encoding='ISO-8859-1', low_memory=False) df.columns.values df['Age_band'] = 0 df.loc[df['Age'] <= 16, 'Age_band'] = 0 df.loc[(df['Age'] > 16) & (df['Age'] <= 32), 'Age_band'] = 1 df.loc[(df['Age'] > 32) & (df['Age'] <= 48), 'Age_band'] = 2 df.loc[(df['Age'] ...
code
2022470/cell_37
[ "image_output_1.png" ]
import matplotlib.pyplot as plt import pandas as pd import seaborn as sns df = pd.read_csv('../input/train.csv', encoding='ISO-8859-1', low_memory=False) df.columns.values df['Age_band'] = 0 df.loc[df['Age'] <= 16, 'Age_band'] = 0 df.loc[(df['Age'] > 16) & (df['Age'] <= 32), 'Age_band'] = 1 df.loc[(df['Age'] > 32)...
code
16139957/cell_9
[ "text_plain_output_1.png" ]
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) raw_data = pd.read_csv('../input/rows.csv', usecols=['CMPLNT_FR_DT', 'Latitude', 'Longitude']).dropna() rd = raw_data rd = rd[rd['Latitude'] > rd['Latitude'].mean() - 3 * rd['Latitude'].std()][rd['Latitude'] < rd['Latitude'].mean() + 3 * rd['Latit...
code
16139957/cell_4
[ "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) raw_data = pd.read_csv('../input/rows.csv', usecols=['CMPLNT_FR_DT', 'Latitude', 'Longitude']).dropna() first_date = np.datetime64('2006-01-01') days = (pd.to_datetime(raw_data['CMPLNT_FR_DT'], format='%m/%d/%Y...
code
16139957/cell_6
[ "text_plain_output_1.png" ]
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) raw_data = pd.read_csv('../input/rows.csv', usecols=['CMPLNT_FR_DT', 'Latitude', 'Longitude']).dropna() rd = raw_data rd = rd[rd['Latitude'] > rd['Latitude'].mean() - 3 * rd['Latitude'].std()][rd['Latitude'] < rd['Latitude'].mean() + 3 * rd['Latit...
code
16139957/cell_11
[ "text_plain_output_1.png" ]
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) raw_data = pd.read_csv('../input/rows.csv', usecols=['CMPLNT_FR_DT', 'Latitude', 'Longitude']).dropna() rd = raw_data rd = rd[rd['Latitude'] > rd['Latitude'].mean() - 3 * rd['Latitude'].std()][rd['Latitude'] < rd['Latitude'].mean() + 3 * rd['Latit...
code
16139957/cell_19
[ "text_plain_output_1.png" ]
import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) raw_data = pd.read_csv('../input/rows.csv', usecols=['CMPLNT_FR_DT', 'Latitude', 'Longitude']).dropna() first_date = np.datetime64('2006-01-01') days = (pd.to_datetime(raw_data['CMPLNT_FR_DT'], format='%m/%d/%Y...
code
16139957/cell_1
[ "text_plain_output_1.png" ]
import os import numpy as np import pandas as pd import os print(os.listdir('../input'))
code
16139957/cell_7
[ "text_plain_output_1.png" ]
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) raw_data = pd.read_csv('../input/rows.csv', usecols=['CMPLNT_FR_DT', 'Latitude', 'Longitude']).dropna() rd = raw_data rd = rd[rd['Latitude'] > rd['Latitude'].mean() - 3 * rd['Latitude'].std()][rd['Latitude'] < rd['Latitude'].mean() + 3 * rd['Latit...
code
16139957/cell_18
[ "text_plain_output_1.png" ]
import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) raw_data = pd.read_csv('../input/rows.csv', usecols=['CMPLNT_FR_DT', 'Latitude', 'Longitude']).dropna() first_date = np.datetime64('2006-01-01') days = (pd.to_datetime(raw_data['CMPLNT_FR_DT'], format='%m/%d/%Y...
code
16139957/cell_8
[ "text_plain_output_1.png" ]
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) raw_data = pd.read_csv('../input/rows.csv', usecols=['CMPLNT_FR_DT', 'Latitude', 'Longitude']).dropna() rd = raw_data rd = rd[rd['Latitude'] > rd['Latitude'].mean() - 3 * rd['Latitude'].std()][rd['Latitude'] < rd['Latitude'].mean() + 3 * rd['Latit...
code
16139957/cell_15
[ "text_plain_output_1.png" ]
import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) raw_data = pd.read_csv('../input/rows.csv', usecols=['CMPLNT_FR_DT', 'Latitude', 'Longitude']).dropna() first_date = np.datetime64('2006-01-01') days = (pd.to_datetime(raw_data['CMPLNT_FR_DT'], format='%m/%d/%Y...
code
16139957/cell_16
[ "text_plain_output_1.png", "image_output_1.png" ]
import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) raw_data = pd.read_csv('../input/rows.csv', usecols=['CMPLNT_FR_DT', 'Latitude', 'Longitude']).dropna() first_date = np.datetime64('2006-01-01') days = (pd.to_datetime(raw_data['CMPLNT_FR_DT'], format='%m/%d/%Y...
code
16139957/cell_3
[ "text_plain_output_1.png" ]
import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) raw_data = pd.read_csv('../input/rows.csv', usecols=['CMPLNT_FR_DT', 'Latitude', 'Longitude']).dropna() first_date = np.datetime64('2006-01-01') days = (pd.to_datetime(raw_data['CMPLNT_FR_DT'], format='%m/%d/%Y...
code
16139957/cell_17
[ "text_plain_output_1.png", "image_output_1.png" ]
import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) raw_data = pd.read_csv('../input/rows.csv', usecols=['CMPLNT_FR_DT', 'Latitude', 'Longitude']).dropna() first_date = np.datetime64('2006-01-01') days = (pd.to_datetime(raw_data['CMPLNT_FR_DT'], format='%m/%d/%Y...
code
16139957/cell_14
[ "application_vnd.jupyter.stderr_output_1.png" ]
import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) raw_data = pd.read_csv('../input/rows.csv', usecols=['CMPLNT_FR_DT', 'Latitude', 'Longitude']).dropna() first_date = np.datetime64('2006-01-01') days = (pd.to_datetime(raw_data['CMPLNT_FR_DT'], format='%m/%d/%Y...
code
16139957/cell_10
[ "text_plain_output_1.png" ]
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) raw_data = pd.read_csv('../input/rows.csv', usecols=['CMPLNT_FR_DT', 'Latitude', 'Longitude']).dropna() rd = raw_data rd = rd[rd['Latitude'] > rd['Latitude'].mean() - 3 * rd['Latitude'].std()][rd['Latitude'] < rd['Latitude'].mean() + 3 * rd['Latit...
code
16139957/cell_12
[ "text_plain_output_1.png" ]
GRID_X_DIM = 120 GRID_Y_DIM = 100 lng_step = (max_lng - min_lng) / (GRID_X_DIM - 1) lat_step = (max_lat - min_lat) / (GRID_Y_DIM - 1) (lng_step, lat_step)
code
16139957/cell_5
[ "text_plain_output_1.png" ]
import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) raw_data = pd.read_csv('../input/rows.csv', usecols=['CMPLNT_FR_DT', 'Latitude', 'Longitude']).dropna() first_date = np.datetime64('2006-01-01') days = (pd.to_datetime(raw_data['CMPLNT_FR_DT'], format='%m/%d/%Y...
code
16123173/cell_6
[ "text_plain_output_1.png", "image_output_1.png" ]
import calendar import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) df = pd.read_excel('../input/flight_schedule.xlsx') df.Date = pd.to_datetime(df.Date) df.Time = df.Time.astype(str) df.Time = pd.to_datetime(df.Time) df['Weekday'] = df.Date.dt.weekday df['Weekday'] = df['Weekday'].apply(lambda x...
code
16123173/cell_2
[ "text_html_output_1.png", "application_vnd.jupyter.stderr_output_1.png" ]
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) df = pd.read_excel('../input/flight_schedule.xlsx') df.head()
code
16123173/cell_11
[ "text_plain_output_1.png" ]
import calendar import matplotlib.pyplot as plt import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) df = pd.read_excel('../input/flight_schedule.xlsx') df.Date = pd.to_datetime(df.Date) df.Time = df.Time.astype(str) df.Time = pd.to_datetime(df.Time) df['Weekd...
code
16123173/cell_1
[ "text_plain_output_1.png" ]
import numpy as np import pandas as pd import os from datetime import datetime import calendar import matplotlib.pyplot as plt import seaborn as sns print(os.listdir('../input'))
code
16123173/cell_7
[ "text_plain_output_1.png", "image_output_1.png" ]
import calendar import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) df = pd.read_excel('../input/flight_schedule.xlsx') df.Date = pd.to_datetime(df.Date) df.Time = df.Time.astype(str) df.Time = pd.to_datetime(df.Time) df['Weekday'] = df.Date.dt.weekday df['Weekday'] = df['Weekday'].apply(lambda x...
code
16123173/cell_3
[ "image_output_1.png" ]
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) df = pd.read_excel('../input/flight_schedule.xlsx') df.Date = pd.to_datetime(df.Date) df.Time = df.Time.astype(str) df.Time = pd.to_datetime(df.Time) df.info()
code
16123173/cell_10
[ "text_html_output_1.png" ]
import calendar import matplotlib.pyplot as plt import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) df = pd.read_excel('../input/flight_schedule.xlsx') df.Date = pd.to_datetime(df.Date) df.Time = df.Time.astype(str) df.Time = pd.to_datetime(df.Time) df['Weekd...
code
16123173/cell_5
[ "image_output_1.png" ]
import calendar import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) df = pd.read_excel('../input/flight_schedule.xlsx') df.Date = pd.to_datetime(df.Date) df.Time = df.Time.astype(str) df.Time = pd.to_datetime(df.Time) df['Weekday'] = df.Date.dt.weekday df['Weekday'] = df['Weekday'].apply(lambda x...
code
34126468/cell_13
[ "text_plain_output_1.png" ]
stack = [3, 4, 5] stack.append(6) stack.append(7) stack
code
34126468/cell_9
[ "text_plain_output_1.png" ]
fruits = ['orange', 'apple', 'pear', 'banana', 'kiwi', 'apple', 'banana'] fruits.count('apple') fruits.count('tangerine') fruits.index('banana') fruits.index('banana', 4) fruits.reverse() fruits fruits.append('grape') fruits
code
34126468/cell_25
[ "text_plain_output_1.png" ]
t = (12345, 54321, 'hello!') t[0]
code
34126468/cell_4
[ "application_vnd.jupyter.stderr_output_1.png" ]
fruits = ['orange', 'apple', 'pear', 'banana', 'kiwi', 'apple', 'banana'] fruits.count('apple')
code
34126468/cell_6
[ "text_plain_output_1.png" ]
fruits = ['orange', 'apple', 'pear', 'banana', 'kiwi', 'apple', 'banana'] fruits.count('apple') fruits.count('tangerine') fruits.index('banana')
code
34126468/cell_40
[ "text_plain_output_1.png" ]
a = set('abracadabra') b = set('alacazam') a
code
34126468/cell_29
[ "text_plain_output_1.png" ]
v = ([1, 2, 3], [3, 2, 1]) v
code
34126468/cell_39
[ "text_plain_output_1.png" ]
basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'} 'crabgrass' in basket
code
34126468/cell_26
[ "text_plain_output_1.png" ]
t = (12345, 54321, 'hello!') t[0] t
code
34126468/cell_48
[ "text_plain_output_1.png" ]
tel = {'jack': 4098, 'sape': 4139} tel['guido'] = 4127 tel del tel['sape'] tel
code
34126468/cell_11
[ "text_plain_output_1.png" ]
fruits = ['orange', 'apple', 'pear', 'banana', 'kiwi', 'apple', 'banana'] fruits.count('apple') fruits.count('tangerine') fruits.index('banana') fruits.index('banana', 4) fruits.reverse() fruits fruits.append('grape') fruits fruits.sort() fruits fruits.pop()
code
34126468/cell_7
[ "text_plain_output_1.png" ]
fruits = ['orange', 'apple', 'pear', 'banana', 'kiwi', 'apple', 'banana'] fruits.count('apple') fruits.count('tangerine') fruits.index('banana') fruits.index('banana', 4)
code
34126468/cell_28
[ "text_plain_output_1.png" ]
t = (12345, 54321, 'hello!') t[0] t[0] = 88888
code
34126468/cell_8
[ "text_plain_output_1.png" ]
fruits = ['orange', 'apple', 'pear', 'banana', 'kiwi', 'apple', 'banana'] fruits.count('apple') fruits.count('tangerine') fruits.index('banana') fruits.index('banana', 4) fruits.reverse() fruits
code
34126468/cell_15
[ "text_plain_output_1.png" ]
stack = [3, 4, 5] stack.append(6) stack.append(7) stack stack.pop() stack
code
34126468/cell_16
[ "text_plain_output_1.png" ]
stack = [3, 4, 5] stack.append(6) stack.append(7) stack stack.pop() stack.pop() stack.pop() stack
code
34126468/cell_38
[ "text_plain_output_1.png" ]
basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'} 'orange' in basket
code
34126468/cell_47
[ "text_plain_output_1.png" ]
tel = {'jack': 4098, 'sape': 4139} tel['guido'] = 4127 tel tel['jack']
code
34126468/cell_35
[ "text_plain_output_1.png" ]
t = (12345, 54321, 'hello!') t[0] x, y, z = t print(x, y, z)
code
34126468/cell_46
[ "text_plain_output_1.png" ]
tel = {'jack': 4098, 'sape': 4139} tel['guido'] = 4127 tel
code
34126468/cell_14
[ "text_plain_output_1.png" ]
stack = [3, 4, 5] stack.append(6) stack.append(7) stack stack.pop()
code
34126468/cell_10
[ "text_plain_output_1.png" ]
fruits = ['orange', 'apple', 'pear', 'banana', 'kiwi', 'apple', 'banana'] fruits.count('apple') fruits.count('tangerine') fruits.index('banana') fruits.index('banana', 4) fruits.reverse() fruits fruits.append('grape') fruits fruits.sort() fruits
code
34126468/cell_27
[ "text_plain_output_1.png" ]
t = (12345, 54321, 'hello!') t[0] u = (t, (1, 2, 3, 4, 5)) u
code
34126468/cell_37
[ "text_plain_output_1.png" ]
basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'} print(basket)
code
34126468/cell_5
[ "text_plain_output_1.png" ]
fruits = ['orange', 'apple', 'pear', 'banana', 'kiwi', 'apple', 'banana'] fruits.count('apple') fruits.count('tangerine')
code
106194155/cell_11
[ "text_html_output_1.png" ]
data = port.copy() data.head()
code
106194155/cell_15
[ "text_html_output_2.png" ]
import plotly.express as px import plotly.express as px data = port.copy() data.Pstatus.value_counts() import plotly.express as px fig = px.funnel(data, x='sex', y='G3') fig.show()
code
106194155/cell_14
[ "text_plain_output_1.png" ]
data = port.copy() data.Pstatus.value_counts()
code
106194155/cell_12
[ "text_plain_output_1.png" ]
data = port.copy() data.info()
code
129007065/cell_2
[ "text_plain_output_2.png", "application_vnd.jupyter.stderr_output_1.png" ]
from gensim.models import KeyedVectors from sklearn.neighbors import NearestNeighbors import numpy as np import numpy as np # linear algebra import pandas as pd import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) from sklearn.neighbors import NearestNeighbors from gensim.models import KeyedVect...
code
129007065/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
129007065/cell_3
[ "image_output_1.png" ]
from gensim.models import KeyedVectors from sklearn.neighbors import NearestNeighbors import matplotlib.pyplot as plt import numpy as np import numpy as np # linear algebra import pandas as pd import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) from sklearn.neighbors import NearestNeighbors fr...
code
72111100/cell_13
[ "text_html_output_1.png" ]
train = pd.read_csv('../input/car-price/train set.csv') names = [x.split(' ')[0] for x in list(train['name'])] train.insert(0, 'brand', names) train = train.drop(['name', 'seller_type', 'owner', 'torque', 'fuel'], axis=1) train['engine'] = [int(x.split(' ')[0]) for x in list(train['engine'])] train['mileage'] = [f...
code
72111100/cell_25
[ "text_html_output_1.png" ]
from sklearn.linear_model import LinearRegression as LR, Perceptron from sklearn.model_selection import cross_val_score from sklearn.preprocessing import StandardScaler from sklearn.svm import SVR train = pd.read_csv('../input/car-price/train set.csv') names = [x.split(' ')[0] for x in list(train['name'])] train....
code
72111100/cell_26
[ "text_plain_output_1.png" ]
from sklearn.linear_model import LinearRegression as LR, Perceptron from sklearn.model_selection import cross_val_score from sklearn.preprocessing import StandardScaler from sklearn.svm import SVR train = pd.read_csv('../input/car-price/train set.csv') names = [x.split(' ')[0] for x in list(train['name'])] train....
code