StringMethods should have the same methods as standard str (original) (raw)
Navigation Menu
Appearance settings
- AI CODE CREATION
* GitHub CopilotWrite better code with AI
* GitHub SparkBuild and deploy intelligent apps
* GitHub ModelsManage and compare prompts
* MCP RegistryNewIntegrate external tools - DEVELOPER WORKFLOWS
* ActionsAutomate any workflow
* CodespacesInstant dev environments
* IssuesPlan and track work
* Code ReviewManage code changes - APPLICATION SECURITY
* GitHub Advanced SecurityFind and fix vulnerabilities
* Code securitySecure your code as you build
* Secret protectionStop leaks before they start - EXPLORE
* Why GitHub
* Documentation
* Blog
* Changelog
* Marketplace
- AI CODE CREATION
- BY COMPANY SIZE
* Enterprises
* Small and medium teams
* Startups
* Nonprofits - BY USE CASE
* App Modernization
* DevSecOps
* DevOps
* CI/CD
* View all use cases - BY INDUSTRY
* Healthcare
* Financial services
* Manufacturing
* Government
* View all industries
- BY COMPANY SIZE
- EXPLORE BY TOPIC
* AI
* Software Development
* DevOps
* Security
* View all topics - EXPLORE BY TYPE
* Customer stories
* Events & webinars
* Ebooks & reports
* Business insights
* GitHub Skills - SUPPORT & SERVICES
* Documentation
* Customer support
* Community forum
* Trust center
* Partners
- EXPLORE BY TOPIC
- COMMUNITY
* GitHub SponsorsFund open source developers - PROGRAMS
* Security Lab
* Maintainer Community
* Accelerator
* Archive Program - REPOSITORIES
* Topics
* Trending
* Collections
- COMMUNITY
- Pricing
Provide feedback
We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
pandas-dev / pandas Public
Notifications You must be signed in to change notification settings
Additional navigation options
Closed
Closed
StringMethods should have the same methods as standard str
#9111
Labels
API DesignStringsString extension data type and string data
Milestone
Description
opened
Should StringMethods be compatible with standard str, or have only useful methods? Sometimes I have to adjust text formats before converting other types, and I've chosen additionals which makes formatting / adjustments easier. Any ideas?
str.find(ENH: Add StringMethod.find and rfind #9386)str.rfind(ENH: Add StringMethod.find and rfind #9386)str.isalnum(ENH: StringMethods supports is_xxx methods #9282)str.isalpha(ENH: StringMethods supports is_xxx methods #9282)str.isdigit(ENH: StringMethods supports is_xxx methods #9282)str.isspace(ENH: StringMethods supports is_xxx methods #9282)str.islower(ENH: StringMethods supports is_xxx methods #9282)str.isupper(ENH: StringMethods supports is_xxx methods #9282)str.istitle(ENH: StringMethods supports is_xxx methods #9282)str.ljust(ENH: StringMethods now supports ljust and rjust #9352)str.rjust(ENH: StringMethods now supports ljust and rjust #9352):StringMethods.padworks as the same asljust,rjustandcenterby switchingsideoption. AndStringMethods.centerexists,ljustandrjustdon't.str.rsplit:splitalso supports regex, and there seems no straightforward way torsplitusing regex. (ENH: added rsplit to StringMethods #10303)str.zfill(ENH: Add StringMethods.zfill #9387)StringMethods.centerandStringMethods.padshould have 'fillchar` kw to specify padding character. (ENH: StringMethods now supports ljust and rjust #9352)str.capitalize(ENH: Add StringMethods.capitalize and swapcase #9766)str.swapcase(ENH: Add StringMethods.capitalize and swapcase #9766)str.translate(ENH: support str translate for StringMethods #10052)str.index(ENH: support StringMethods index and rindex #10045)str.rindex(ENH: support StringMethods index and rindex #10045)str.partition(ENH: Add StringMethods.partition and rpartition #9773)str.rpartition(ENH: Add StringMethods.partition and rpartition #9773)unicode.isnumeric(ENH: Add StringMethods.isnumeric and isdecimal #9439)unicode.isdecimal(ENH: Add StringMethods.isnumeric and isdecimal #9439)unicodedata.normalize(ENH: Added str.normalize to use unicodedata.normalize #10031)
NOTE For python 2.x, once convert target to unicode internally then call the func.
Which may not be very userful:
expandtabssplitlines
I think there is an option to implement these to say "support the same methods as standard str".
Metadata
Metadata
Assignees
No one assigned
Labels
API DesignStringsString extension data type and string data
Type
No type
Projects
No projects
Milestone
Relationships
None yet
Development
No branches or pull requests