Managed to do it:
b = pd.read_csv('b.dat')
b.index = pd.to_datetime(b['date'],format="%m/%d/%y %I:%M%p")
b.groupby(by=[b.index.month, b.index.year])
Or
b.groupby(pd.Grouper(freq='M')) # update for v0.21+
More Related Contents:
- Python Pandas Group by date using datetime data
- How to change the datetime format in Pandas
- Aggregation in Pandas
- Filtering Pandas DataFrames on dates
- Pandas GroupBy.apply method duplicates first group
- Pandas Dataframe line plot display date on xaxis
- Changing the formatting of a datetime axis in matplotlib
- Pandas groupby mean – into a dataframe?
- How to use groupby to concatenate strings in python pandas?
- Generating random dates within a given range in pandas
- How to access pandas groupby dataframe by key
- group by pandas dataframe and select latest in each group
- How to change the datetime tick label frequency for matplotlib plots
- pandas to_datetime parsing wrong year
- How to drop duplicates based on two or more subsets criteria in Pandas data-frame
- Python Pandas Conditional Sum with Groupby
- Pandas get frequency of item occurrences in a column as percentage [duplicate]
- Python/Pandas convert string to time only
- Transform vs. aggregate in Pandas
- Convert Pandas Series to DateTime in a DataFrame
- Convert dataframe index to datetime
- How to add/subtract time (hours, minutes, etc.) from a Pandas DataFrame.Index whos objects are of type datetime.time?
- Which is the fastest way to extract day, month and year from a given date?
- In Pandas how do I convert a string of date strings to datetime objects and put them in a DataFrame?
- Pandas groupby to to_csv
- Group DataFrame in 5-minute intervals
- pd.to_datetime is getting half my dates with flipped day / months
- Clean way to convert quarterly periods to datetime in pandas
- pandas extract year from datetime: df[‘year’] = df[‘date’].year is not working
- Python Pandas : pandas.to_datetime() is switching day & month when day is less than 13