2 Comments
User's avatar
Don C's avatar

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

Expand full comment
Benjamin Bennett Alexander's avatar

Hi Don

Thanks for that. It looks like you are typing df.copy instead of df_copy. Correct that typo in the code.

Expand full comment