Skip to content
  • Tutorials
    • c programming
      • libraries
    • c++
    • Linux
    • Python
    • batch programming
    • Technology
  • IDE
  • Tools
resampling data python 1

resampling data python

June 17, 2022 by Anurag batra
#Resample to monthly
df.resample('M').asfreq()

Here is what the above code is Doing:
1. Resample the dataframe to monthly frequency.
2. Use the asfreq() method to convert to monthly frequency.
3. Use the last observation of the month.

Categories Python Examples
Post navigation
relative path python
export python pandas dataframe as json file
© MyEduKit - 2022 . All Rights Reserved.