Skip to content

remove string ',' in quote price #335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 2, 2017
Merged

Conversation

silau2005
Copy link
Contributor

replace(',','')
this will facilitate the conversion from string to float, and avoid exception

replace(',','')
this will facilitate the conversion from string to float, and avoid exception
@silau2005
Copy link
Contributor Author

this string ',' removal is especially important for handling index price
e.g. INDEXHANGSENG:HSI
the original quote price is a string with ',' to show the thousand price point
which will cause error when converting to float

@femtotrader
Copy link
Contributor

femtotrader commented Jun 3, 2017

This PR should close #345

@femtotrader
Copy link
Contributor

For PEP8 you should write

.replace(',', '')

instead of

.replace(',','')

this string ',' removal is especially important for handling index price
e.g. INDEXHANGSENG:HSI
the original quote price is a string with ',' to show the thousand price point
which will cause error when converting to float

edited for PEP8
this is a re-summit as Im seeing some requests on this issue, wish could pass the test
@gliptak gliptak mentioned this pull request Jun 22, 2017
@jreback jreback merged commit 30f40e3 into pydata:master Jul 2, 2017
@jreback
Copy link
Contributor

jreback commented Jul 2, 2017

thanks.

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.

3 participants