path stringlengths 13 17 | screenshot_names listlengths 1 873 | code stringlengths 0 40.4k | cell_type stringclasses 1
value |
|---|---|---|---|
130022960/cell_17 | [
"image_output_1.png"
] | import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
asus = pd.DataFrame(pd.read_csv('/kaggle/input/advertising-sales-dataset/Advertising Budget and Sales.csv'))
asus.shape
asus.drop(columns=['Unnamed: 0'])
b = asus['Newspaper Ad Budget ($)'].quantile(0.98)
asus_new = asus[asu... | code |
130022960/cell_24 | [
"text_plain_output_1.png"
] | import matplotlib.pyplot as plt
import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
asus = pd.DataFrame(pd.read_csv('/kaggle/input/advertising-sales-dataset/Advertising Budget and Sales.csv'))
asus.shape
asus.drop(columns=['Unnamed: 0'])
b = asus['News... | code |
130022960/cell_14 | [
"text_plain_output_1.png"
] | import matplotlib.pyplot as plt
import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
asus = pd.DataFrame(pd.read_csv('/kaggle/input/advertising-sales-dataset/Advertising Budget and Sales.csv'))
asus.shape
asus.drop(columns=['Unnamed: 0'])
b = asus['News... | code |
130022960/cell_10 | [
"application_vnd.jupyter.stderr_output_1.png"
] | import matplotlib.pyplot as plt
import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
asus = pd.DataFrame(pd.read_csv('/kaggle/input/advertising-sales-dataset/Advertising Budget and Sales.csv'))
asus.shape
asus.drop(columns=['Unnamed: 0'])
plt.figure(fig... | code |
130022960/cell_12 | [
"text_plain_output_1.png"
] | import matplotlib.pyplot as plt
import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
asus = pd.DataFrame(pd.read_csv('/kaggle/input/advertising-sales-dataset/Advertising Budget and Sales.csv'))
asus.shape
asus.drop(columns=['Unnamed: 0'])
plt.figure(fig... | code |
130022960/cell_5 | [
"image_output_1.png"
] | import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
asus = pd.DataFrame(pd.read_csv('/kaggle/input/advertising-sales-dataset/Advertising Budget and Sales.csv'))
asus.shape
asus.info() | code |
88101711/cell_9 | [
"text_plain_output_1.png",
"image_output_1.png"
] | import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_csv('../input/barcelona/listings.csv')
pd.set_option('display.max_columns', None)
df.info() | code |
88101711/cell_34 | [
"text_plain_output_1.png"
] | import missingno as msno
import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_csv('../input/barcelona/listings.csv')
pd.set_option('display.max_columns', None)
cols = df.columns
df.drop(df.columns[[1, 2, 4, 5, 6, 7, 9, 13, 18, 19, 22, 34, 42, 43, 44, 45, 46, 47, 4... | code |
88101711/cell_30 | [
"text_plain_output_1.png"
] | import missingno as msno
import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_csv('../input/barcelona/listings.csv')
pd.set_option('display.max_columns', None)
cols = df.columns
df.drop(df.columns[[1, 2, 4, 5, 6, 7, 9, 13, 18, 19, 22, 34, 42, 43, 44, 45, 46, 47, 4... | code |
88101711/cell_33 | [
"text_plain_output_1.png"
] | import missingno as msno
import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_csv('../input/barcelona/listings.csv')
pd.set_option('display.max_columns', None)
cols = df.columns
df.drop(df.columns[[1, 2, 4, 5, 6, 7, 9, 13, 18, 19, 22, 34, 42, 43, 44, 45, 46, 47, 4... | code |
88101711/cell_44 | [
"text_plain_output_1.png"
] | import missingno as msno
import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
df = pd.read_csv('../input/barcelona/listings.csv')
pd.set_option('display.max_columns', None)
cols = df.columns
df.drop(df.columns[[1, 2, 4, 5, 6, 7, 9, 13, 18, 19, 22, 34, 42... | code |
88101711/cell_20 | [
"text_plain_output_1.png",
"image_output_1.png"
] | import missingno as msno
import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_csv('../input/barcelona/listings.csv')
pd.set_option('display.max_columns', None)
cols = df.columns
df.drop(df.columns[[1, 2, 4, 5, 6, 7, 9, 13, 18, 19, 22, 34, 42, 43, 44, 45, 46, 47, 4... | code |
88101711/cell_40 | [
"text_html_output_1.png"
] | import missingno as msno
import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_csv('../input/barcelona/listings.csv')
pd.set_option('display.max_columns', None)
cols = df.columns
df.drop(df.columns[[1, 2, 4, 5, 6, 7, 9, 13, 18, 19, 22, 34, 42, 43, 44, 45, 46, 47, 4... | code |
88101711/cell_48 | [
"text_plain_output_1.png",
"image_output_1.png"
] | import missingno as msno
import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
df = pd.read_csv('../input/barcelona/listings.csv')
pd.set_option('display.max_columns', None)
cols = df.columns
df.drop(df.columns[[1, 2, 4, 5, 6, 7, 9, 13, 18, 19, 22, 34, 42... | code |
88101711/cell_11 | [
"text_plain_output_1.png"
] | import missingno as msno
import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_csv('../input/barcelona/listings.csv')
pd.set_option('display.max_columns', None)
cols = df.columns
msno.bar(df[cols[:30]], fontsize=8, figsize=(20, 5)) | code |
88101711/cell_18 | [
"text_plain_output_1.png"
] | import missingno as msno
import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_csv('../input/barcelona/listings.csv')
pd.set_option('display.max_columns', None)
cols = df.columns
df.drop(df.columns[[1, 2, 4, 5, 6, 7, 9, 13, 18, 19, 22, 34, 42, 43, 44, 45, 46, 47, 4... | code |
88101711/cell_32 | [
"application_vnd.jupyter.stderr_output_1.png"
] | import missingno as msno
import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_csv('../input/barcelona/listings.csv')
pd.set_option('display.max_columns', None)
cols = df.columns
df.drop(df.columns[[1, 2, 4, 5, 6, 7, 9, 13, 18, 19, 22, 34, 42, 43, 44, 45, 46, 47, 4... | code |
88101711/cell_38 | [
"text_html_output_1.png"
] | import missingno as msno
import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_csv('../input/barcelona/listings.csv')
pd.set_option('display.max_columns', None)
cols = df.columns
df.drop(df.columns[[1, 2, 4, 5, 6, 7, 9, 13, 18, 19, 22, 34, 42, 43, 44, 45, 46, 47, 4... | code |
88101711/cell_3 | [
"text_plain_output_1.png"
] | import os
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import missingno as msno
import os
for dirname, _, filenames in os.walk('/kaggle/input'):
for filename in filenames:
print(os.path.join(dirname, filename)) | code |
88101711/cell_35 | [
"text_html_output_1.png"
] | import missingno as msno
import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_csv('../input/barcelona/listings.csv')
pd.set_option('display.max_columns', None)
cols = df.columns
df.drop(df.columns[[1, 2, 4, 5, 6, 7, 9, 13, 18, 19, 22, 34, 42, 43, 44, 45, 46, 47, 4... | code |
88101711/cell_46 | [
"image_output_1.png"
] | import missingno as msno
import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_csv('../input/barcelona/listings.csv')
pd.set_option('display.max_columns', None)
cols = df.columns
df.drop(df.columns[[1, 2, 4, 5, 6, 7, 9, 13, 18, 19, 22, 34, 42, 43, 44, 45, 46, 47, 4... | code |
88101711/cell_24 | [
"text_plain_output_1.png"
] | import missingno as msno
import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_csv('../input/barcelona/listings.csv')
pd.set_option('display.max_columns', None)
cols = df.columns
df.drop(df.columns[[1, 2, 4, 5, 6, 7, 9, 13, 18, 19, 22, 34, 42, 43, 44, 45, 46, 47, 4... | code |
88101711/cell_22 | [
"text_plain_output_1.png",
"image_output_1.png"
] | import missingno as msno
import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_csv('../input/barcelona/listings.csv')
pd.set_option('display.max_columns', None)
cols = df.columns
df.drop(df.columns[[1, 2, 4, 5, 6, 7, 9, 13, 18, 19, 22, 34, 42, 43, 44, 45, 46, 47, 4... | code |
88101711/cell_12 | [
"text_html_output_1.png"
] | import missingno as msno
import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_csv('../input/barcelona/listings.csv')
pd.set_option('display.max_columns', None)
cols = df.columns
msno.bar(df[cols[30:]], fontsize=8, figsize=(20, 5)) | code |
88101711/cell_5 | [
"text_plain_output_1.png"
] | import pandas as pd
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
df = pd.read_csv('../input/barcelona/listings.csv')
pd.set_option('display.max_columns', None)
df.head() | code |
1009787/cell_4 | [
"image_output_1.png"
] | import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import numpy as np
import pandas as pd
import kagglegym
train_df = pd.read_json('../input/train.json')
test_df = pd.read_json('../input/test.json')
import matplotlib.pyplot as plt
import seaborn as sns
color = sns.color_palette()
int_level = ... | code |
1009787/cell_2 | [
"text_html_output_1.png"
] | import pandas as pd
import numpy as np
import pandas as pd
import kagglegym
train_df = pd.read_json('../input/train.json')
test_df = pd.read_json('../input/test.json')
train_df.head() | code |
17118436/cell_13 | [
"application_vnd.jupyter.stderr_output_1.png"
] | batch_size = 8
max_epochs = 2000
print('Iniciando treinamento... ') | code |
17118436/cell_9 | [
"application_vnd.jupyter.stderr_output_1.png"
] | import pandas as pd
dfCleveland = pd.read_csv('cleveland_train.csv', header=None)
dfCleveland | code |
17118436/cell_19 | [
"text_plain_output_1.png"
] | import numpy as np
import tensorflow as tf
np.random.seed(4)
tf.set_random_seed(13)
mp = '.\\cleveland_model.h5'
model.save(mp)
np.set_printoptions(precision=4)
unknown = np.array([[0.75, 1, 0, 1, 0, 0.49, 0.27, 1, -1, -1, 0.62, -1, 0.4, 0, 1, 0.23, 1, 0]], dtype=np.float32)
predicted = model.predict(unknown)
print... | code |
17118436/cell_3 | [
"application_vnd.jupyter.stderr_output_2.png",
"text_plain_output_1.png"
] | import numpy as np
import keras as K
import tensorflow as tf
import pandas as pd
import seaborn as sns
import os
from matplotlib import pyplot as plt
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' | code |
17118436/cell_17 | [
"application_vnd.jupyter.stderr_output_1.png"
] | print('Salvando modelo em arquivo \n')
mp = '.\\cleveland_model.h5'
model.save(mp) | code |
17109964/cell_42 | [
"text_plain_output_1.png"
] | animals = ['cat', 'dog', 'monkey']
for animal in animals:
print(animal) | code |
17109964/cell_63 | [
"text_plain_output_1.png"
] | d = {'cat': 'cute', 'dog': 'furry'}
del d['fish']
d = {'person': 2, 'cat': 4, 'spider': 8}
for animal in d:
legs = d[animal]
d = {'person': 2, 'cat': 4, 'spider': 8}
for animal, legs in d.items():
print('A %s has %d legs' % (animal, legs)) | code |
17109964/cell_81 | [
"text_plain_output_1.png"
] | hello = 'hello'
world = 'world'
def hello(name, loud=False):
if loud:
print('HELLO, %s' % name.upper())
else:
print('Hello, %s!' % name)
hello('Bob')
hello('Fred', loud=True) | code |
17109964/cell_13 | [
"text_plain_output_1.png"
] | x = 3
print(x + 1)
print(x - 1)
print(x * 2)
print(x ** 2) | code |
17109964/cell_57 | [
"text_plain_output_1.png"
] | d = {'cat': 'cute', 'dog': 'furry'}
print(d.get('monkey', 'N/A'))
print(d.get('fish', 'N/A')) | code |
17109964/cell_56 | [
"text_plain_output_1.png"
] | d = {'cat': 'cute', 'dog': 'furry'}
print(d['monkey']) | code |
17109964/cell_34 | [
"text_plain_output_1.png"
] | xs = [3, 1, 2]
xs.append('bar')
print(xs) | code |
17109964/cell_23 | [
"text_plain_output_1.png"
] | hello = 'hello'
world = 'world'
hw = hello + ' ' + world
print(hw) | code |
17109964/cell_79 | [
"text_plain_output_1.png"
] | x = 3
xs = [3, 1, 2]
xs.append('bar')
x = xs.pop()
def sign(x):
if x > 0:
return 'positive'
elif x < 0:
return 'negative'
else:
return 'zero'
for x in [-1, 0, 1]:
print(sign(x)) | code |
17109964/cell_90 | [
"text_plain_output_1.png"
] | import numpy as np
a = np.array([1, 2, 3])
a[0] = 5
b = np.array([[1, 2, 3], [4, 5, 6]])
print(b)
print(b.shape)
print(b[0, 0], b[0, 1], b[1, 0]) | code |
17109964/cell_33 | [
"text_plain_output_1.png"
] | xs = [3, 1, 2]
xs[2] = 'foo'
print(xs) | code |
17109964/cell_44 | [
"text_plain_output_1.png"
] | animals = ['cat', 'dog', 'monkey']
animals = ['cat', 'dog', 'monkey']
for idx, animal in enumerate(animals):
print('#%d: %s' % (idx + 1, animal)) | code |
17109964/cell_20 | [
"text_plain_output_1.png"
] | print(t and f)
print(t or f)
print(not t)
print(t != f) | code |
17109964/cell_55 | [
"text_plain_output_1.png"
] | d = {'cat': 'cute', 'dog': 'furry'}
d['fish'] = 'wet'
print(d['fish']) | code |
17109964/cell_76 | [
"text_plain_output_1.png"
] | x = 3
xs = [3, 1, 2]
xs.append('bar')
x = xs.pop()
d = {'cat': 'cute', 'dog': 'furry'}
del d['fish']
d = {'person': 2, 'cat': 4, 'spider': 8}
for animal in d:
legs = d[animal]
d = {'person': 2, 'cat': 4, 'spider': 8}
d = {(x, x + 1): x for x in range(10)}
t = (5, 6)
t[0] = 1 | code |
17109964/cell_92 | [
"text_plain_output_1.png"
] | import numpy as np
a = np.array([1, 2, 3])
a[0] = 5
b = np.array([[1, 2, 3], [4, 5, 6]])
a = np.zeros((2, 2))
print(a) | code |
17109964/cell_94 | [
"text_plain_output_1.png"
] | import numpy as np
a = np.array([1, 2, 3])
a[0] = 5
b = np.array([[1, 2, 3], [4, 5, 6]])
a = np.zeros((2, 2))
b = np.ones((1, 2))
c = np.full((2, 2), 7)
print(c) | code |
17109964/cell_39 | [
"text_plain_output_1.png"
] | nums = list(range(5))
print(nums)
print(nums[2:4])
print(nums[2:])
print(nums[:2])
print(nums[:])
print(nums[:-1])
nums[2:4] = [8, 9]
print(nums) | code |
17109964/cell_26 | [
"text_plain_output_1.png"
] | s = 'hello'
print(s.capitalize())
print(s.upper())
print(s.rjust(7))
print(s.center(7))
print(s.replace('l', '(ell)'))
print(' world '.strip()) | code |
17109964/cell_65 | [
"text_plain_output_1.png"
] | x = 3
xs = [3, 1, 2]
xs.append('bar')
x = xs.pop()
nums = list(range(5))
nums[2:4] = [8, 9]
nums = [0, 1, 2, 3, 4]
squares = []
for x in nums:
squares.append(x ** 2)
nums = [0, 1, 2, 3, 4]
squares = [x ** 2 for x in nums]
nums = [0, 1, 2, 3, 4]
even_squares = [x ** 2 for x in nums if x % 2 == 0]
nums = [0, ... | code |
17109964/cell_61 | [
"text_plain_output_1.png"
] | d = {'cat': 'cute', 'dog': 'furry'}
del d['fish']
d = {'person': 2, 'cat': 4, 'spider': 8}
for animal in d:
legs = d[animal]
print('A %s has %d legs' % (animal, legs)) | code |
17109964/cell_54 | [
"text_plain_output_1.png"
] | d = {'cat': 'cute', 'dog': 'furry'}
print(d['cat'])
print('cat' in d) | code |
17109964/cell_72 | [
"text_plain_output_1.png"
] | from math import sqrt
x = 3
xs = [3, 1, 2]
xs.append('bar')
x = xs.pop()
from math import sqrt
print({int(sqrt(x)) for x in range(30)}) | code |
17109964/cell_19 | [
"text_plain_output_1.png"
] | t, f = (True, False)
print(type(t)) | code |
17109964/cell_49 | [
"text_plain_output_1.png"
] | x = 3
xs = [3, 1, 2]
xs.append('bar')
x = xs.pop()
nums = list(range(5))
nums[2:4] = [8, 9]
nums = [0, 1, 2, 3, 4]
squares = []
for x in nums:
squares.append(x ** 2)
nums = [0, 1, 2, 3, 4]
squares = [x ** 2 for x in nums]
print(squares) | code |
17109964/cell_89 | [
"text_plain_output_1.png"
] | import numpy as np
a = np.array([1, 2, 3])
print(type(a), a.shape, a[0], a[1], a[2])
a[0] = 5
print(a) | code |
17109964/cell_32 | [
"text_plain_output_1.png"
] | xs = [3, 1, 2]
print(xs, xs[2])
print(xs[-1], xs[-2], xs[-3]) | code |
17109964/cell_51 | [
"application_vnd.jupyter.stderr_output_1.png"
] | x = 3
xs = [3, 1, 2]
xs.append('bar')
x = xs.pop()
nums = list(range(5))
nums[2:4] = [8, 9]
nums = [0, 1, 2, 3, 4]
squares = []
for x in nums:
squares.append(x ** 2)
nums = [0, 1, 2, 3, 4]
squares = [x ** 2 for x in nums]
nums = [0, 1, 2, 3, 4]
even_squares = [x ** 2 for x in nums if x % 2 == 0]
print(even_s... | code |
17109964/cell_68 | [
"text_plain_output_1.png"
] | animals = ['cat', 'dog', 'monkey']
animals = ['cat', 'dog', 'monkey']
animals = {'cat', 'dog'}
print('cat' in animals)
print('fish' in animals)
animals.add('fish')
print(len(animals))
animals.add('cat')
print(len(animals)) | code |
17109964/cell_96 | [
"text_plain_output_1.png"
] | import numpy as np
x = 3
xs = [3, 1, 2]
xs.append('bar')
x = xs.pop()
d = {'cat': 'cute', 'dog': 'furry'}
del d['fish']
d = {'person': 2, 'cat': 4, 'spider': 8}
for animal in d:
legs = d[animal]
d = {'person': 2, 'cat': 4, 'spider': 8}
d = {(x, x + 1): x for x in range(10)}
t = (5, 6)
a = np.array([1, 2, ... | code |
17109964/cell_58 | [
"text_plain_output_1.png"
] | d = {'cat': 'cute', 'dog': 'furry'}
del d['fish']
print(d.get('fish', 'N/A')) | code |
17109964/cell_102 | [
"text_plain_output_1.png"
] | import numpy as np
import numpy as np
x = 3
xs = [3, 1, 2]
xs.append('bar')
x = xs.pop()
d = {'cat': 'cute', 'dog': 'furry'}
del d['fish']
d = {'person': 2, 'cat': 4, 'spider': 8}
for animal in d:
legs = d[animal]
d = {'person': 2, 'cat': 4, 'spider': 8}
d = {(x, x + 1): x for x in range(10)}
t = (5, 6)
... | code |
17109964/cell_95 | [
"text_plain_output_1.png"
] | import numpy as np
x = 3
xs = [3, 1, 2]
xs.append('bar')
x = xs.pop()
d = {'cat': 'cute', 'dog': 'furry'}
del d['fish']
d = {'person': 2, 'cat': 4, 'spider': 8}
for animal in d:
legs = d[animal]
d = {'person': 2, 'cat': 4, 'spider': 8}
d = {(x, x + 1): x for x in range(10)}
t = (5, 6)
a = np.array([1, 2, ... | code |
17109964/cell_8 | [
"text_plain_output_1.png"
] | def quicksort(arr):
if len(arr) <= 1:
return arr
pivot = arr[int(len(arr) / 2)]
left = [x for x in arr if x < pivot]
middle = [x for x in arr if x == pivot]
right = [x for x in arr if x > pivot]
return quicksort(left) + middle + quicksort(right)
print(quicksort([3, 6, 8, 10, 1, 2, 1])) | code |
17109964/cell_15 | [
"text_plain_output_1.png"
] | y = 2.5
print(type(y))
print(y, y + 1, y * 2, y ** 2) | code |
17109964/cell_75 | [
"text_plain_output_1.png"
] | x = 3
xs = [3, 1, 2]
xs.append('bar')
x = xs.pop()
d = {'cat': 'cute', 'dog': 'furry'}
del d['fish']
d = {'person': 2, 'cat': 4, 'spider': 8}
for animal in d:
legs = d[animal]
d = {'person': 2, 'cat': 4, 'spider': 8}
d = {(x, x + 1): x for x in range(10)}
t = (5, 6)
print(type(t))
print(d)
print(d[t])
print... | code |
17109964/cell_47 | [
"text_plain_output_1.png"
] | x = 3
xs = [3, 1, 2]
xs.append('bar')
x = xs.pop()
nums = list(range(5))
nums[2:4] = [8, 9]
nums = [0, 1, 2, 3, 4]
squares = []
for x in nums:
squares.append(x ** 2)
print(squares) | code |
17109964/cell_35 | [
"text_plain_output_1.png"
] | x = 3
xs = [3, 1, 2]
xs.append('bar')
x = xs.pop()
print(x, xs) | code |
17109964/cell_93 | [
"text_plain_output_1.png"
] | import numpy as np
a = np.array([1, 2, 3])
a[0] = 5
b = np.array([[1, 2, 3], [4, 5, 6]])
a = np.zeros((2, 2))
b = np.ones((1, 2))
print(b) | code |
17109964/cell_24 | [
"text_plain_output_1.png"
] | hello = 'hello'
world = 'world'
hw12 = '%s %s %d %.4f' % (hello, world, 12, 10)
print(hw12) | code |
17109964/cell_100 | [
"text_plain_output_1.png"
] | import numpy as np
import numpy as np
x = 3
xs = [3, 1, 2]
xs.append('bar')
x = xs.pop()
d = {'cat': 'cute', 'dog': 'furry'}
del d['fish']
d = {'person': 2, 'cat': 4, 'spider': 8}
for animal in d:
legs = d[animal]
d = {'person': 2, 'cat': 4, 'spider': 8}
d = {(x, x + 1): x for x in range(10)}
t = (5, 6)
... | code |
17109964/cell_14 | [
"text_plain_output_1.png"
] | print(7 // 3)
print(7 % 3) | code |
17109964/cell_22 | [
"text_plain_output_1.png"
] | hello = 'hello'
world = 'world'
print(hello, len(hello)) | code |
17109964/cell_104 | [
"text_plain_output_1.png"
] | import numpy as np
import numpy as np
x = 3
xs = [3, 1, 2]
xs.append('bar')
x = xs.pop()
d = {'cat': 'cute', 'dog': 'furry'}
del d['fish']
d = {'person': 2, 'cat': 4, 'spider': 8}
for animal in d:
legs = d[animal]
d = {'person': 2, 'cat': 4, 'spider': 8}
d = {(x, x + 1): x for x in range(10)}
t = (5, 6)
... | code |
17109964/cell_12 | [
"text_plain_output_1.png"
] | x = 3
print(x, type(x)) | code |
17109964/cell_70 | [
"application_vnd.jupyter.stderr_output_1.png"
] | animals = ['cat', 'dog', 'monkey']
animals = ['cat', 'dog', 'monkey']
animals = {'cat', 'dog'}
animals.add('fish')
animals.add('cat')
animals = {'cat', 'dog', 'fish'}
for idx, animal in enumerate(animals):
print('#%d: %s' % (idx + 1, animal)) | code |
49120489/cell_21 | [
"text_plain_output_1.png"
] | from sklearn.ensemble import BaggingClassifier
from sklearn.feature_selection import RFE
from sklearn.feature_selection import RFE
from sklearn.feature_selection import RFECV
from sklearn.feature_selection import RFECV
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import confusion_matri... | code |
49120489/cell_13 | [
"text_plain_output_1.png"
] | from sklearn.feature_selection import RFE
from sklearn.feature_selection import RFECV
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import confusion_matrix
import matplotlib.pyplot as plt
import matplotlib.pyplot as plt
import seaborn as sns
import seaborn as sns
from sklearn.linear_m... | code |
49120489/cell_2 | [
"image_output_1.png"
] | import pandas as pd
data = pd.read_csv('../input/breast-cancer-prediction-dataset/Breast_cancer_data.csv')
print('Dataset :', data.shape)
x = data.iloc[:, [0, 1, 2, 3]].values
data.info()
data[0:10] | code |
49120489/cell_19 | [
"text_plain_output_1.png",
"image_output_1.png"
] | from sklearn.ensemble import BaggingClassifier
from sklearn.feature_selection import RFE
from sklearn.feature_selection import RFE
from sklearn.feature_selection import RFECV
from sklearn.linear_model import LogisticRegression
from sklearn.multiclass import OneVsRestClassifier
from sklearn.linear_model import Log... | code |
49120489/cell_7 | [
"text_plain_output_1.png"
] | from sklearn.linear_model import LogisticRegression
from sklearn.metrics import confusion_matrix
import matplotlib.pyplot as plt
import seaborn as sns
import seaborn as sns
from sklearn.linear_model import LogisticRegression
logreg = LogisticRegression(C=10)
logreg.fit(X_train, Y_train)
Y_predict1 = logreg.predict... | code |
49120489/cell_8 | [
"application_vnd.jupyter.stderr_output_1.png"
] | from sklearn.linear_model import LogisticRegression
from sklearn.linear_model import LogisticRegression
logreg = LogisticRegression(C=10)
logreg.fit(X_train, Y_train)
Y_predict1 = logreg.predict(X_test)
score_logreg = logreg.score(X_test, Y_test)
print(score_logreg) | code |
49120489/cell_16 | [
"text_plain_output_1.png"
] | from sklearn.ensemble import BaggingClassifier
from sklearn.feature_selection import RFE
from sklearn.feature_selection import RFECV
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import confusion_matrix
from sklearn.multiclass import OneVsRestClassifier
from sklearn.svm import SVC
impo... | code |
49120489/cell_17 | [
"text_plain_output_2.png",
"application_vnd.jupyter.stderr_output_1.png"
] | from sklearn.ensemble import BaggingClassifier
from sklearn.feature_selection import RFE
from sklearn.feature_selection import RFECV
from sklearn.linear_model import LogisticRegression
from sklearn.multiclass import OneVsRestClassifier
from sklearn.svm import SVC
from sklearn.linear_model import LogisticRegressio... | code |
49120489/cell_10 | [
"text_html_output_1.png",
"text_plain_output_1.png"
] | from sklearn.feature_selection import RFE
from sklearn.linear_model import LogisticRegression
from sklearn.linear_model import LogisticRegression
logreg = LogisticRegression(C=10)
logreg.fit(X_train, Y_train)
Y_predict1 = logreg.predict(X_test)
score_logreg = logreg.score(X_test, Y_test)
from sklearn.feature_select... | code |
49120489/cell_12 | [
"image_output_1.png"
] | from sklearn.feature_selection import RFE
from sklearn.feature_selection import RFECV
from sklearn.linear_model import LogisticRegression
from sklearn.linear_model import LogisticRegression
logreg = LogisticRegression(C=10)
logreg.fit(X_train, Y_train)
Y_predict1 = logreg.predict(X_test)
score_logreg = logreg.score... | code |
33096822/cell_13 | [
"text_plain_output_1.png",
"image_output_1.png"
] | import matplotlib.pyplot as plt
avo['Month'] = avo['Date'].apply(lambda x: x.month)
avo.groupby('Month').mean()['AveragePrice'].sort_values(ascending=False).index[0]
avo.drop(avo.loc[avo['region'] == 'TotalUS'].index, inplace=True)
avo.groupby('region').sum()['Total Volume']
avo.groupby('region').sum()['Total Volume... | code |
33096822/cell_9 | [
"text_plain_output_1.png",
"image_output_1.png"
] | avo['Month'] = avo['Date'].apply(lambda x: x.month)
avo.groupby('Month').mean()['AveragePrice'].sort_values(ascending=False).index[0] | code |
33096822/cell_4 | [
"text_plain_output_1.png",
"image_output_1.png"
] | import matplotlib.pyplot as plt
plt.figure(figsize=(15, 5))
avo['AveragePrice'].plot() | code |
33096822/cell_6 | [
"text_html_output_1.png"
] | import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
type(avo['Date'].iloc[0])
avo['Date'] = pd.to_datetime(avo['Date'])
type(avo['Date'].iloc[0]) | code |
33096822/cell_2 | [
"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 |
33096822/cell_11 | [
"text_plain_output_1.png"
] | avo['Month'] = avo['Date'].apply(lambda x: x.month)
avo.groupby('Month').mean()['AveragePrice'].sort_values(ascending=False).index[0]
avo.drop(avo.loc[avo['region'] == 'TotalUS'].index, inplace=True)
avo.groupby('region').sum()['Total Volume'] | code |
33096822/cell_7 | [
"text_plain_output_1.png"
] | avo[avo['AveragePrice'] == avo['AveragePrice'].max()]['Date'] | code |
33096822/cell_18 | [
"text_plain_output_1.png"
] | import matplotlib.pyplot as plt
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
type(avo['Date'].iloc[0])
avo['Date'] = pd.to_datetime(avo['Date'])
type(avo['Date'].iloc[0])
avo['Month'] = avo['Date'].apply(lambda x: x.month)
avo.groupby('Month').mean()['AveragePrice'].sort_values(ascending=Fa... | code |
33096822/cell_8 | [
"text_plain_output_1.png",
"image_output_1.png"
] | avo[avo['AveragePrice'] == avo['AveragePrice'].min()]['Date'] | code |
33096822/cell_15 | [
"text_plain_output_1.png"
] | import matplotlib.pyplot as plt
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
type(avo['Date'].iloc[0])
avo['Date'] = pd.to_datetime(avo['Date'])
type(avo['Date'].iloc[0])
avo['Month'] = avo['Date'].apply(lambda x: x.month)
avo.groupby('Month').mean()['AveragePrice'].sort_values(ascending=Fa... | code |
33096822/cell_16 | [
"text_plain_output_1.png"
] | import matplotlib.pyplot as plt
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
type(avo['Date'].iloc[0])
avo['Date'] = pd.to_datetime(avo['Date'])
type(avo['Date'].iloc[0])
avo['Month'] = avo['Date'].apply(lambda x: x.month)
avo.groupby('Month').mean()['AveragePrice'].sort_values(ascending=Fa... | code |
33096822/cell_3 | [
"text_plain_output_1.png"
] | import matplotlib.pyplot as plt
import seaborn as sns
import datetime
avo = pd.read_csv('/kaggle/input/avocado-prices/avocado.csv')
avo | code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.