Skip to content

DOC: need SQL -> pandas tips #4524

Closed
Closed
@jreback

Description

@jreback

of course #4164 makes this syntax easier anyhow

Here's an example of the types of things we need (obviously not all apply here)
http://www.pytables.org/moin/HintsForSQLUsers

we have this in the docs for join/merge, but maybe useful for:

  • groupby
  • boolean indexing to replace select

e.g.

select * from mytables where A='bar' and B>to_date('20130101')

replaced by:

df[(df.A=='bar') & (df.B>Timestamp('20130101'))

select count(*) from mytables

replaced by

len(df)

etc

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocsIO SQLto_sql, read_sql, read_sql_query

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions