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

Add wildcard as a supported token #976

Open
PyGeek03 opened this issue May 13, 2021 · 2 comments
Open

Add wildcard as a supported token #976

PyGeek03 opened this issue May 13, 2021 · 2 comments

Comments

@PyGeek03
Copy link

Feature Request

While doing some data wrangling, I have to parse a column of dates with a lot of date formats mixed in and extract the year part of those dates (Arrow has been of immense help!). However, there is a format that's quite peculiar: almost all instances of them conforms to MM-YYYY, but one instance has MM as 14 (which must have been a data entry error). The application I'm building is expected to be able to handle these kinds of data entry errors. I know I could fix it simply by switching to DD-YYYY or just use regex, but I believe that arrow.get("14-2010", [..., "**-YYYY", ...]).year would 1) best convey that I don't care about anything in the date except for year and 2) be more succinct than a bunch of if-else statements (which, I think, is the point of having arrow.get() accept a list of possible formats). I would work on this if you guys think this is a feature worth implementing rather than feature bloat. Thanks!

@anishnya
Copy link
Member

Thanks for the request @PyGeek03! @jadchaar what are your thoughts? I also think we should link this to #725.

@jadchaar
Copy link
Member

jadchaar commented May 18, 2021

Interesting request. I think this is definitely something that we can do since we form a regular expression from the input datetime format string and a wildcard is natural in regex. I can also see some nice uses for natural language processing, so I think 725 is a natural link.

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

No branches or pull requests

3 participants