I have a csv file which contains 3 years of data (time series). After importing the data in python I have created dataframe. The problem is that the indexing starts from 0 and continues but I want that for each month the indexing can again begin from 0 so that when I plot the day number on graph starts from 0. How can I create multiple dataframes for different months by extracting only certain number of rows each time for a single dataframe
Tried to create an empty dataframe and import a certain number of rows (for February) in it but still the index it take is 31 as January ends on 30 (if we start from 0). I imported csv
, created a dataframe, used the iloc
function for jan data (row indexing is from 0 to 31), for feb I have done row accessing from 31:59, so it shows in print as well as plot starting from 31.
But I want to make each month start from 1.