Python automatically converts number to date -


i dropping numerical values in column using following code, somehow changes all numerical values date type, not need. cannot see how fix it, appreciate if of fix error me.

df = pd.read_csv(datapath+"completeorder_hanoi_alltime.csv")  df = df.drop(df[df.completed_orders == 0].index) df = df.dropna(subset = ["completed_orders"]) df['y'] = np.log(df['completed_orders'])  df['y'] = df.drop(df[df.y <= 0].index) df = df.drop('completed_orders', axis = 1) df = df.drop('percent_completed', axis = 1) df['ds'] = df['to_char'] df = df.drop('to_char', axis = 1) df['ds'] = pd.to_datetime(df['ds']) 

your last statement converts df['ds'] datetime. add print statement of df['ds'] see what's being converted.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -