Skip to content

Example for adding a calculated column in SQL and Pandas #28182

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

Merged
merged 4 commits into from
Aug 29, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
try fix lint error: space around = in keyword
  • Loading branch information
DavidRosen authored Aug 27, 2019
commit 427a46b9aee5f5ef6064ae24f3e8e3d8b6bda1a2
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ With pandas, you can use the :meth:`DataFrame.assign` method of a DataFrame to a

.. ipython:: python

tips.assign(tip_rate = tips['tip'] / tips['total_bill']).head(5)
tips.assign(tip_rate=tips['tip']/tips['total_bill']).head(5)

WHERE
-----
Expand Down