-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Fix pipe docs #29368
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
Fix pipe docs #29368
Conversation
Unsure why the code coverage has dramatically reduced.. |
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.
Want to avoid using lambdas where possible
""" | ||
Chicago, IL -> Chicago for city_name column | ||
""" | ||
df['city_name'] = df['city_and_code'].apply(lambda x: x.split(', ')[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.
df['city_name'] = df['city_and_code'].apply(lambda x: x.split(', ')[0]) | |
df['city_name'] = df['city_and_code'].str.split(",").str.get(0) |
Chicago -> Chicago-US for city_name column | ||
""" | ||
col = 'city_name' | ||
df['city_and_country'] = df[col].apply(lambda x: f'{x}-{country_name}') |
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.
df['city_and_country'] = df[col].apply(lambda x: f'{x}-{country_name}') | |
df['city_and_country'] = df[col] + "-USA" |
Thanks for the comments @WillAyd totally agree - updated |
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 @datapythonista care to take a look here?
Thanks @alimcmaster1 |
Thanks @WillAyd |
Sorry I couldn't check this before. Looks great, good job @alimcmaster1. Happy to see this finally improved. |
See the image below which highlights what i've done here
flake8-rst doc/source --filename=/getting_started/basics.rst
runs cleancc. @datapythonista to review