# libraries
import json
import pandas as pd
from urllib.request import urlopen
# json file
url = ("https://jsonplaceholder.typicode.com/comments")
data = json.load(urlopen(url))
df = pd.DataFrame(data)
print(df.head())
postId id name \
0 1 1 id labore ex et quam laborum
1 1 2 quo vero reiciendis velit similique earum
2 1 3 odio adipisci rerum aut animi
3 1 4 alias odio sit
4 1 5 vero eaque aliquid doloribus et culpa
email body
0 Eliseo@gardner.biz laudantium enim quasi est quidem magnam volupt...
1 Jayne_Kuhic@sydney.com est natus enim nihil est dolore omnis voluptat...
2 Nikita@garfield.biz quia molestiae reprehenderit quasi aspernatur\...
3 Lew@alysha.tv non et atque\noccaecati deserunt quas accusant...
4 Hayden@althea.biz harum non quasi et ratione\ntempore iure ex vo...
# Loading the preloaded file in deepnote
df = pd.read_csv('/datasets/txtfile/partidos.txt')
df.head()
idPartidoint64
temporadaobject
0
1
1970-71
1
2
1970-71
2
3
1970-71
3
4
1970-71
4
5
1970-71
# Loading the preloaded file in deepnote
file = '/datasets/excelfile/precios_gas_95_espana.xls'
df = pd.read_excel(file)
df.head()
Provinciaobject
Localidadobject
0
PALMAS (LAS)
AGUIMES
1
PALMAS (LAS)
AGUIMES
2
PALMAS (LAS)
AGUIMES
3
PALMAS (LAS)
SAN ISIDRO
4
SANTA CRUZ DE TENERIFE
REALEJOS (LOS)
# Loading the preloaded file in deepnote. The 'sep' option will depend on each dataset
df = pd.read_csv('/datasets/carscsv/cars.csv',sep=',')
df.head()
manufacturer_nameobject
model_nameobject
0
Subaru
Outback
1
Subaru
Outback
2
Subaru
Forester
3
Subaru
Impreza
4
Subaru
Legacy