Problem Description: Run the following program to generate the hotel turnover simulation data file in the current folder Data.csv
Then complete the following tasks:
1) Use Pandas to read the data in the file Data.csv, create the Dataframe object, and delete all of the missing values;
2) Use Matplotlib to generate line chart, reflect the daily turnover of the hotel, and save the graphic as a local file first.jpg;
3) Statistics by month, using Matplotlib to draw a histogram showing the turnover of each month, and save the graphic as a local file second.jpg;
4) According to the month statistics, find the next two months maximum increase, and the largest increase in the month to write file maxMonth.txt;
5) Quarterly statistics of the hotel's turnover in 2018, using Matplotlib to generate a pie chart showing the distribution of turnover in the 4 quarters of 2018 years, and save the graphic as a local file third.jpg.
Problem resolution Reference Code:
The resulting first.jpg effect:
The resulting second.jpg effect:
The resulting third.jpg effect:
Python+pandas+matplotlib data analysis and visualization cases