-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: f-string in pandas/core/window/* #29952
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
CLN: f-string in pandas/core/window/* #29952
Conversation
b023181
to
80f9c1b
Compare
finally ready for review |
pandas/core/window/expanding.py
Outdated
@@ -209,10 +209,10 @@ def skew(self, **kwargs): | |||
|
|||
>>> arr = [1, 2, 3, 4, 999] | |||
>>> import scipy.stats | |||
>>> fmt = "{0:.6f}" # limit the printed precision to 6 digits | |||
>>> print(fmt.format(scipy.stats.kurtosis(arr[:-1], bias=False))) | |||
>>> precision = 6 # limit the printed precision to 6 digits |
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.
Minor but I find this rather distracting from the code sample. Can you just hard-code the format specifier in the print statements below?
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.
Sounds good - just did that.
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.
lgtm
thanks @ganevgv |
ref #29547
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff