I have a .csv file that look s similar to the example below:

Month-Year          Buses          Ferries
Jan-06                2,568             752

Feb-06                2,756            658
Mar-06                2,756            658
April-06                2,756            658
...                        ...                  ...
Jan-07                2,325             786
Feb-07                2,826             821
Mar-07                2,756            658
April-07                2,756            658

Currently I am plotting every month and the year (as the .csv file is layed out above) but I just want the year total and plot that instead.

Im using pandas framework and plotly to plot the data which may have different functions than standard python to manipulate lists but that shouldn't matter.
Im just looking for which functions in python I could use which would filter out the years that are the same and then I guess I would create a seperate list of those months along with the other corresponding columns - add the buses and ferries columns and then build a new data frame.

Quote 0 0