Skip to Main Content
The Data Analysis Workshop
book

The Data Analysis Workshop

by Gururajan Govindan, Shubhangi Hora, Konstantin Palagachev, Brent Broadnax, John Wesley Doyle, Ashish Jain, Robert Thas John, Ravi Ranjan Prasad Karn, Pritesh Tiwari
July 2020
Beginner to intermediate content levelBeginner to intermediate
626 pages
10h 2m
English
Packt Publishing
Content preview from The Data Analysis Workshop

Appendix

1. Bike Sharing Analysis

Activity 1.01: Investigating the Impact of Weather Conditions on Rides

  1. Import the required libraries and the initial hour data:

    # import libraries

    import pandas as pd

    import matplotlib.pyplot as plt

    import seaborn as sns

    from scipy.stats import pearsonr

    %matplotlib inline

    # load hourly data

    data = pd.read_csv('https://raw.githubusercontent.com/'\

                       'PacktWorkshops/'\

                       'The-Data-Analysis-Workshop/master/'\

                       'Chapter01/data/hour.csv')

  2. Create a new column in which weathersit is mapped to the four categorical values specified in Exercise 1.01, Preprocessing Temporal and Weather Features (clear, cloudy, light_rain_snow, and heavy_rain_snow):

    # create new column by encoding ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The Data Science Workshop - Second Edition

The Data Science Workshop - Second Edition

Anthony So, Thomas Joseph, Robert Thas John, Andrew Worsley, Dr. Samuel Asare
The Data Wrangling Workshop - Second Edition

The Data Wrangling Workshop - Second Edition

Brian Lipp, Shubhadeep Roychowdhury, Dr. Tirthajyoti Sarkar, John Wesley Doyle, Harshil Jain, Robert Thas John, Akshay Khare, Nagendra Nagaraj, Samik Sen, Dr. Vlad Sebastian Ionescu
The Data Visualization Workshop

The Data Visualization Workshop

Mario Döbler, Tim Großmann, Rohan Chikorde, Joshua Görner, Anshu Kumar, Piotr Malak, Ankit Verma
The Applied Data Science Workshop - Second Edition

The Applied Data Science Workshop - Second Edition

Alex Galea, Paul Van Branteghem, Guillermina Bea j, Shovon Sengupta, Karen Yang

Publisher Resources

ISBN: 9781839211386Supplemental Content