Skip to content

Conversation

mmcky
Copy link
Contributor

@mmcky mmcky commented Nov 15, 2022

No description provided.

@github-actions
Copy link

@mmcky
Copy link
Contributor Author

mmcky commented Nov 15, 2022

@HumphreyYang I will merge this to fix the cache but it looks like PetroChina is no longer a valid ticker in the exercise.

@mmcky mmcky merged commit 6b508e1 into main Nov 15, 2022
@mmcky mmcky deleted the fix-pandas branch November 15, 2022 09:54
@HumphreyYang
Copy link
Member

HumphreyYang commented Nov 17, 2022

Hi @mmcky,

# Change the index to date
prices.index = pd.to_datetime(prices.index.date)

This line is needed for Nikkei data to show up. I think the problem in the cache run is caused by missing values in PetroChina.

@HumphreyYang HumphreyYang restored the fix-pandas branch November 17, 2022 07:31
@HumphreyYang
Copy link
Member

HumphreyYang commented Nov 17, 2022

Hi @mmcky, I am fixing this issue in #252.

@mmcky
Copy link
Contributor Author

mmcky commented Nov 17, 2022

Hi @mmcky,

# Change the index to date
prices.index = pd.to_datetime(prices.index.date)

This line is needed for Nikkei data to show up. I think the problem in the cache run is caused by missing values in PetroChina.

The issue when I looked at it though is with prices.index.date the index didn't contain a date named parameter.

@HumphreyYang
Copy link
Member

Hi @mmcky,

Change the index to date

prices.index = pd.to_datetime(prices.index.date)

This line is needed for Nikkei data to show up. I think the problem in the cache run is caused by missing values in PetroChina.

The issue when I looked at it though is with prices.index.date the index didn't contain a date named parameter.

I saw that as well. It seems 'yfinance' does not return 'datetime' when the ticker is not found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants