I’m using pandas 0.16.2. This has better performance on my large dataset:
data.groupby(data.date.dt.year)
Using the dt
option and playing around with weekofyear
, dayofweek
etc. becomes far easier.
More Related Contents:
- Fast punctuation removal with pandas
- How to one-hot-encode from a pandas column containing a list?
- Skip rows during csv import pandas
- Rename Pandas DataFrame Index
- What is the fastest way to upload a big csv file in notebook to work with python pandas?
- How to check if any value is NaN in a Pandas DataFrame
- pandas dataframe groupby datetime month
- Pandas counting and summing specific conditions
- Convert row to column header for Pandas DataFrame,
- vlookup in Pandas using join
- Use AWS Glue Python with NumPy and Pandas Python Packages
- Select multiple ranges of columns in Pandas DataFrame
- pandas multiprocessing apply
- Memory error when using pandas read_csv
- How to set some xlim and ylim in Seaborn lmplot facetgrid
- Left justify string values in a pandas DataFrame
- How can I replicate rows in Pandas?
- pandas – get most recent value of a particular column indexed by another column (get maximum value of a particular column indexed by another column)
- How to create a DataFrame of random integers with Pandas?
- summing two columns in a pandas dataframe
- add a row at top in pandas dataframe [duplicate]
- Computing diffs within groups of a dataframe
- Specifying date format when converting with pandas.to_datetime
- Is it possible to add a string as a legend item in matplotlib
- Nested Dictionary to MultiIndex pandas DataFrame (3 level)
- KeyError when indexing Pandas dataframe
- How to iterate over columns of pandas dataframe to run regression
- Load CSV to Pandas MultiIndex DataFrame
- Python pandas – new column’s value if the item is in the list
- bash: Python import – Command not found for pandas