Date: 04 Jul 2022

Module: pydataset


Installation: pip install pydataset


About: Access various available datasets instantly without going through
the hassle of searching, downloading and reading.


Sample Source Code:

from pydataset import data


# To load a dataset

titanic = data('titanic')


# To display the documentation of a dataset

data('titanic', show_doc=True)


# To see the available datasets

print("Available Dataset:")

print(data())


Execution:

$ python pydataset_sample.py


Output:

titanic


PyDataset Documentation (adopted from R Documentation. The displayed
examples are in R)


## titanic


### Description


The data is an observation-based version of the 1912 Titanic passenger

survival log,


### Usage


    data(titanic)


### Format


A data frame with 1316 observations on the following 4 variables.


`class`


a factor with levels `1st class` `2nd class` `3rd class` `crew`


`age`


a factor with levels `child` `adults`


`sex`


a factor with levels `women` `man`


`survived`


a factor with levels `no` `yes`


### Details


titanic is saved as a data frame. Used to assess risk ratios


### Source


Found in many other texts


### References


Hilbe, Joseph M (2014), Modeling Count Data, Cambridge University Press
Hilbe,

Joseph M (2007, 2011), Negative Binomial Regression, Cambridge University

Press Hilbe, Joseph M (2009), Logistic Regression Models, Chapman & Hall/CRC


### Examples


    data(titanic)

    titanic$survival <- titanic$survived == "yes"

    glmlr <- glm(survival ~ age + sex + factor(class), family=binomial,
data=titanic)

    summary(glmlr)



Available Dataset:

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

..             ...                                               ...

752        VerbAgg                  Verbal Aggression item responses

753           cake                 Breakage Angle of Chocolate Cakes

754           cbpp                 Contagious bovine pleuropneumonia

755    grouseticks  Data on red grouse ticks from Elston et al. 2001

756     sleepstudy       Reaction times in a sleep deprivation study


[757 rows x 2 columns]



Reference: https://pypi.org/project/pydataset/
_______________________________________________
Chennaipy mailing list
Chennaipy@python.org
https://mail.python.org/mailman/listinfo/chennaipy

Reply via email to