-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: need SQL -> pandas tips #4524
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
Comments
Where were you thinking this should go? Perhaps could add to/rename the R comparison section cc #3980 Although tbh not sure what purpose of that section actually is, perhaps slightly different? But if it was syntax/idiom differences:
seem like they should be in the same section. |
actually you should be able to do |
yes....syntax differences is a better title....maybe a How To section? e.g. say you are from a SQL backgroud, how to do '......' in pandas? |
I think I could try to find some SQL popular / tricky examples and compare it to pandas, where I should put these comparisons? I still don't have good pandas solution for some SQL queries, but it'll be interesting to find it |
interesting reference |
Here is a notebook you guys can use if you are short in time. |
I thought this was a nice intro - ttp://www.gregreda.com/2013/10/26/intro-to-pandas-data-structures/ (by @gjreda) |
I like how your intro gets through key features (like I/O) in a very human way that's easy to follow. That said, I'm not sure there's a good fit for that sort of thing in the docs (10 minutes to pandas is somewhat like that, though less conversational), but the later parts where you take an SQL statement and convert it into what you'd use in pandas could be a nice fit, especially with your explanation. That plus some of the notes from @pichonz could be a nice foundation for a SQL:pandas 'cheat sheet'. Also, if you have any suggestions for edits to the docs, those are always welcome! |
Sounds good. I'll try to add some stuff over the next week or two. |
Great! |
After PR #5615 this can be closed? |
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:
e.g.
replaced by:
df[(df.A=='bar') & (df.B>Timestamp('20130101'))
replaced by
len(df)
etc
The text was updated successfully, but these errors were encountered: