Comments (6)
take
from pandas.
Replaced absolute string slicing into split to resolve this issue
# YearBegin(), BYearBegin() use month = starting month of year.
# QuarterBegin(), BQuarterBegin() use startingMonth = starting
# month of year. Other offsets use month, startingMonth as ending
# month of year.
period_str = "".join([dt_char for dt_char in list(freqstr.split("-")[0]) if not dt_char.isdigit()])
if (period_str in ["MS", "QS", "YS"]):
end_month = 12 if month_kw == 1 else month_kw - 1
start_month = month_kw
Gives me
[4/4] Linking target pandas/_libs/tslibs/fields.cpython-310-x86_64-linux-gnu.so
[ True True]
from pandas.
I don't think this is the solution, we need to go up some levels and look for something like freq.n
@natmokval you'd done a bunch of work in this area, so this might be interesting to you to try fixing?
from pandas.
I don't think this is the solution, we need to go up some levels and look for something like
freq.n
@natmokval you'd done a bunch of work in this area, so this might be interesting to you to try fixing?
Can you elaborate more on this one?
from pandas.
@natmokval you'd done a bunch of work in this area, so this might be interesting to you to try fixing?
Yeah, sure, I would like to work on this.
from pandas.
period_str = "".join([
dt_char for dt_char in list(freqstr.split("-")[0]) if not dt_char.isdigit()
])
Splits the freqstr
and removes the digits. So it can properly parse 10MS, 10YS-JAN, 2B etc., I believe it is more viable option to absolute slicing
from pandas.
Related Issues (20)
- NON-BUG: `to_csv()` argument `float_format` has no effect, always saves with format of "%.2g" HOT 2
- ENH: Replacing behavior currently provided by pandas.to_numeric using errors="ignore"
- BUG: unexpected behavior when Loading lines like "\""\t"a" HOT 5
- BUG: SQL connection HOT 2
- ENH: is it worth fixing a warning from a third party library here HOT 5
- BUG: AttributeError about dateutil.relativedelta when calling pd.read_json(json_data) HOT 5
- DOC: sentence fragment in "String methods" HOT 1
- DOC: "list" is not a keyword - .query() HOT 1
- BUG: json_normalize KeyError Key not found HOT 1
- ENH: Consistent API between `pd.get_dummies()` and `Series.str.get_dummies()` HOT 6
- ENH: Reduce type requirements for the subset parameter in drop_duplicates/duplicated HOT 5
- BUG: read_sql tries to convert blob/varbinary to string with pyarrow backend HOT 2
- BUG: Pandas squashes 1-dimensional Numpy array with shape (1,) down to a 0-dimensional array HOT 7
- BUG: rolling window with `center=True, min_periods=1` is not symmetric at edges HOT 4
- DOC: Draft PDEPs appear as "Under discussion" in the roadmap
- BUG: Wrong timestamp resolution when parsing timestamp string with comma separated milliseconds HOT 5
- BUILD: HOT 1
- BUG: Series.mul silently returns wrong values with `UInt8` dtype when overflowing the max value range HOT 4
- ENH: Support right hand side operations with Series and custom classes HOT 1
- DOC: New contributor meeting, clarify or remove HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pandas.