0

How do I resample a time series per decades?

It does not like this one:

df.resample('10Y')
2

2 Answers 2

3

The letter Y is not the correct offset alias for year. Try:

df.resample('10A')
0
0

df.resample('10AS')

To get the data from 01-01-1900

2
  • 2
    Please provide additional details in your answer. As it's currently written, it's hard to understand your solution.
    – Community Bot
    Sep 6, 2021 at 7:10
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
    – rg4s
    Sep 6, 2021 at 12:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.