0

I have a pandas dataframe:

 index    timestamp 
  0       06:00:00 
  1       07:00:00
  2         NaT

I am working in Python and would like to map the NaT value in the dataframe to something else.

How can I reference this NaT? I am NOT allowed to use the index column. I must use the timestamp column and refer to NaT specifically.

I have tried something like:

market_info_df.loc[market_info_df['timestamp'] == None, 'market_state'] = MARKET_STATES.CLOSED

But this does not work. Instead of None I have also tried numpy.NaN doesn't work either!

0 Answers0