Reputation: 3
I have read a daily stock data csv file. and re-sample each column to weekly data. now im trying to create a new DataFrame to contain those new resampled columns.my code
when printing im geting only the columns names the return if anyone could point me the mistake in my code please
Upvotes: 0
Views: 331
Reputation: 783
As I understand you have five dataframes after re-sampling :
Open,High,Low,Close,Volume
Then you have:
df = pd.Dataframe(columns)
But you don't actucally include the resampled data into your constructor. So that's where your problem is.
Try this:
df = pd.concat([Open,High,Low,Close,Volume],axis = 1)
Upvotes: 2