Skip to content

comparison_with_sql document: adding a calculated column #28162

Closed
@DavidRosen

Description

@DavidRosen

https://pandas-docs.github.io/pandas-docs-travis/getting_started/comparison/comparison_with_sql.html

In section "SELECT", the important use case of adding a calculated column is omitted.

I suggest adding something like the following:

select *, tip/total_bill as tip_rate from tips

pd.concat([tips, pd.Series(tips.tip/tips.total_bill, name='tip_rate')], axis=1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions