Question: HERE S HOW TO DO IT: Label your notebook with markdown cells to show where the analysis for each of the datasets begins. Boston MBTA

HERES HOW TO DO IT:
Label your notebook with markdown cells to show where the analysis for each of the datasets begins.
Boston MBTA Data
This dataset contains ridership data for Boston area mass transit from January 2007 through October 2011. The original data looks like this:
After a little precleaning, the dataset you will be working on (i.e.,mbta_untidy.csv) looks like this:
2
You will use pandas do the following:
1.
Read the data into a dataframe.
2.
The order column is unnecessary. Drop it from your dataframe.
3.
Use the melt function to convert the year and month columns to a single column called year_mon in the dataframe.
4.
Split the values in the year_mon column into year and month values, then add those values to the dataframe as appropriately named columns.
5.
Drop the year_mon column after you are confident your results are what you were expecting.
Your resulting dataframe should look like this: HERE'S HOW TO DO IT:
Label your notebook with markdown cells to show where the analysis for each of the datasets begins.
Boston MBTA Data
This dataset contains ridership data for Boston area mass transit from January 2007 through October 2011. The original data looks like this:
After a little precleaning, the dataset you will be working on (i.e., "mbta_untidy.csv") looks like this:
You will use pandas do the following:
1. Read the data into a dataframe.
2. The 'order' column is unnecessary. Drop it from your dataframe.
3. Use the melt function to convert the "year and month" columns to a single column called "year_mon" in the dataframe.
4. Split the values in the "year mon" column into year and month values, then add those values to the dataframe as appropriately named columns.
5. Drop the "year_mon" column after you are confident your results are what you were expecting.
Your resulting dataframe should look like this:
HERE S HOW TO DO IT: Label your notebook with

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!