In [58]:
# use library pydatset to get data
from pydataset import data

# check datasets are avaible in this library
print(data()[0:5])

# check how many datsets
print("\n\n","There are %s" %len(data()), "datasets in pydataset library")
      dataset_id                                        title
0  AirPassengers  Monthly Airline Passenger Numbers 1949-1960
1        BJsales            Sales Data with Leading Indicator
2            BOD                    Biochemical Oxygen Demand
3   Formaldehyde                Determination of Formaldehyde
4   HairEyeColor    Hair and Eye Color of Statistics Students


 There are 757 datasets in pydataset library
In [44]:
# Check cars and iris dataset in list of datasets
list_data = data().dataset_id
data()[list_data.isin(["iris","cars"])]
Out[44]:
dataset_id title
31 cars Speed and Stopping Distances of Cars
41 iris Edgar Anderson's Iris Data
In [57]:
# access data 
titanic = data('titanic')
titanic.head(5)
Out[57]:
class age sex survived
1 1st class adults man yes
2 1st class adults man yes
3 1st class adults man yes
4 1st class adults man yes
5 1st class adults man yes
In [ ]: