-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Fix flake8 issues on v19, v20 and v21.0.rst #24236
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
Conversation
doc/source/whatsnew/v0.19.0.rst
Outdated
@@ -319,15 +313,15 @@ These provide date offsets anchored (by default) to the 15th and end of month, a | |||
|
|||
.. ipython:: python | |||
|
|||
Timestamp('2016-01-01') + SemiMonthEnd() | |||
pd.Timestamp('2016-01-01') + SemiMonthEnd() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to use pd.offsets.SemiMonthEnd()
?
I find it more descriptive as the reader doesn't have to scroll around to find where SemiMonthEnd()
came from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean pd.tseries.offsets.SemiMonthEnd()
? I think SemiMonthEnd()
and SemiMonthBegin()
are used right after importing from pandas.tseries.offsets
and that was the only time they were used. I could be wrong. Let me know if it is the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pd.tseries.offsets
is imported as pd.offsets
. They are basically the same. But maybe it's better to leave it like pd.tseries.offsets.SemiMonthEnd()
as I don't know whether it's been the case in v0.19.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The document for v0.19 also uses a single class name like BDay
or DataOffset
. So I will keep it as it is now for consistency.
Codecov Report
@@ Coverage Diff @@
## master #24236 +/- ##
=======================================
Coverage 92.21% 92.21%
=======================================
Files 162 162
Lines 51763 51763
=======================================
Hits 47733 47733
Misses 4030 4030
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #24236 +/- ##
==========================================
+ Coverage 92.21% 92.21% +<.01%
==========================================
Files 162 162
Lines 51768 51768
==========================================
+ Hits 47739 47740 +1
+ Misses 4029 4028 -1
Continue to review full report at Codecov.
|
doc/source/whatsnew/v0.20.0.rst
Outdated
branch = 'master', | ||
path = 'pandas/tests/io/parser/data/salaries.csv.bz2', | ||
) | ||
url = (r'https://github.com/{repo}/raw/{branch}/{path}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why a raw string here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed now.
* upstream/master: pct change bug issue 21200 (pandas-dev#21235) DOC: Fix summaries not ending with a period (pandas-dev#24190) DOC: Add back currentmodule to api.rst (pandas-dev#24232) DOC: Fixed implicit imports for whatsnew (v >= version 20.0) (pandas-dev#24199) remove enum import for PY2 compat, xref pandas-dev#22802 (pandas-dev#24170) CI: Simplify Azure Pipelines configuration files (pandas-dev#23111) REF/TST: Add more pytest idiom to indexing/multiindex/test_getitem.py (pandas-dev#24053)
doc/source/whatsnew/v0.19.0.rst
Outdated
'ask': [720.93, 51.96, 51.98, 52.00, | ||
720.93, 98.01, 720.88, 52.03]}, | ||
columns=['time', 'ticker', 'bid', 'ask']) | ||
trades = pd.DataFrame({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the new standard to align not on the ipython (the i), but 1 space in? this seems odd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems inconsistent even in this file
doc/source/whatsnew/v0.19.0.rst
Outdated
df | ||
df.resample('M', on='date').sum() | ||
df.resample('M', level='d').sum() | ||
df = pd.DataFrame({'date': pd.date_range('2015-01-01', freq='W', periods=5), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here its different
pd.Timestamp('20130101 09:00:05'), | ||
pd.Timestamp('20130101 09:00:06')], | ||
name='foo')) | ||
dft = pd.DataFrame({'B': [0, 1, 2, np.nan, 4]}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I realigned all to overlap with the first letter "i" or "c". Let me know if I miss any block.
* upstream/master: DOC: Fix PEP-8 issues in indexing-, missing_data-, options- and release.rst (pandas-dev#24089)
thanks @thoo |
closes #24219
closes #24220
closes #24222
python make.py --single whatsnew/v0.19.0
,python make.py --single whatsnew/v0.20.0
etc.Related to: DOC: Fix flake8 issue in whatsnew files #24177