Skip to content
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

ENH: Add StringMethods.isnumeric and isdecimal #9439

Merged
merged 1 commit into from
Feb 10, 2015

Conversation

sinhrks
Copy link
Member

@sinhrks sinhrks commented Feb 6, 2015

Derived from #9111.

# 0x2605: ★ not number
# 0x1378: ፸ ETHIOPIC NUMBER SEVENTY
# 0xFF13: 3 Em 3
values = ['A', '3', unichr(0x00bc), unichr(0x2605),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugh... I guess we still support Python 3.2 :(

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't 3.2 tested in below? I've expected compat.unichr can work for 3.2 also.

https://travis-ci.org/pydata/pandas/jobs/49806158

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, it works!

I was going to suggest just using u'¼' but the u unicode literal is not supported on Python 3.2.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I also tried to use u at first and failed... Will wait a conclusion of #9118.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

u(...) is the way to handle 3.2 compat

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can't use u( ) here because escaped unicode is not handled as numeric or decimal.

@jreback jreback added API Design Strings String extension data type and string data labels Feb 10, 2015
@jreback jreback added this to the 0.16.0 milestone Feb 10, 2015
jreback added a commit that referenced this pull request Feb 10, 2015
ENH: Add StringMethods.isnumeric and isdecimal
@jreback jreback merged commit 44e636a into pandas-dev:master Feb 10, 2015
@jreback
Copy link
Contributor

jreback commented Feb 10, 2015

thanks!

@sinhrks sinhrks deleted the string_isnumeric branch February 11, 2015 10:41
@jreback jreback mentioned this pull request Feb 15, 2015
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design Strings String extension data type and string data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants