Python Dataframe.resample () remove time from datetimeindex
For some reason, oversampling to 24H or 1D breaks the time from DateTimeIndex.
I am using python: 3.5.3 / conda numpy: 1.11.3 pandas: 0.20.2
df = pd.read_csv(inFile, parse_dates=True)
print(df.head())
df = df.resample("1D").agg({'open':'first','high':'max','low' :'min','close': 'last','volume': 'sum'}).dropna()
print(df.head()
First print instruction
Second
+3
source to share