0

How do I resample a time series per decades?

It does not like this one:

df.resample('10Y')
Mauro Gentile
  • 1,299
  • 5
  • 23
  • 34

2 Answers2

3

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

df.resample('10A')
Ted Petrou
  • 52,577
  • 18
  • 119
  • 125
0

df.resample('10AS')

To get the data from 01-01-1900

  • 2
    Please provide additional details in your answer. As it's currently written, it's hard to understand your solution. – Community Sep 06 '21 at 07: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 06 '21 at 12:38