-
Notifications
You must be signed in to change notification settings - Fork 5
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
Support other filename prefixes than 'D' #291
Comments
Sorry to nag on this, but how about changing the date parser function like shown below. This uses what I think is a fairly robust regex to find a sub-string in the filename that matches the date format (and only if the default approach of removing the first letter didn't work).
|
Yea, this could be an approach that enhances the functionality without complicating the configs and input arguments from the user side - although it does still assume a specific datestring. I suppose another alternative is to implement an optional input that defines the string format, which could be passed directly to the format optional argument in pd.to_datetime() |
It makes the same assumptions about the datestring as the default, since also the modified code uses pd.to_datetime to create the timestamp. The only change is that the datestring can appear elsewhere in the filename. (Well, almost the same. I added the assumption that the year would start with 20, to make it less likely to find spurious matches. Although spurious matches would only be found if the filename contained six digits, a T, six more digits, a dot, and some more digits, for some other reason than representing the timestamp. Which sounds unlikely to begin with). |
Raymond says no. |
No description provided.
The text was updated successfully, but these errors were encountered: