5

print(df.head) results in

    ds                                  y
0   2019-03-01 10:57:32.381378+00:00    18760
1   2019-03-01 10:58:30.933070+00:00    28140
2   2019-03-01 10:58:45.425421+00:00    35520
3   2019-03-01 10:59:11.588687+00:00    50280
4   2019-03-01 10:59:19.064323+00:00    72420

While trying to work with Facebook Prophet I get the following error: ValueError: Column ds has timezone specified, which is not supported. Remove timezone. I now try to remove timezone from my ds column. Do you have an idea of how to achieve that?

df = pd.read_csv(
    'wob-2019-ticket-sales.csv',
    usecols=['created', 'total_gross'],
    parse_dates=['created'],
    # date_parser=lambda x: pd.to_datetime(x.rpartition('-')[0])
)

df['y'] = df['total_gross'].cumsum()
df = df.rename(columns={'created': 'ds'})
df = df.drop(columns='total_gross')

df.head()
Joey Coder
  • 3,199
  • 8
  • 28
  • 60

0 Answers0