Announcement
Thanks for your newsletter!
I tried working through the code tonight and was wondering if anynone else got an error message.
df_copy = df_copy.assign(
YEAR=df.copy['SETTLEMENTDATE'].dt.year,
MONTH=df.copy['SETTLEMENTDATE'].dt.month,
DAY=df.copy['SETTLEMENTDATE'].dt.day
)
TypeError: 'method' object is not subscriptable
Hi Don
Thanks for that. It looks like you are typing df.copy instead of df_copy. Correct that typo in the code.
Thanks for your newsletter!
I tried working through the code tonight and was wondering if anynone else got an error message.
df_copy = df_copy.assign(
YEAR=df.copy['SETTLEMENTDATE'].dt.year,
MONTH=df.copy['SETTLEMENTDATE'].dt.month,
DAY=df.copy['SETTLEMENTDATE'].dt.day
)
YEAR=df.copy['SETTLEMENTDATE'].dt.year,
TypeError: 'method' object is not subscriptable
Hi Don
Thanks for that. It looks like you are typing df.copy instead of df_copy. Correct that typo in the code.