Rewrite SQL Queries in Pandas
From time to time, I have done various tasks in SQL and Python. However, Pandas’ syntax is quite different from SQL. With SQL, you declare what you want in a sentence that almost reads like English. In Pandas, you apply operations on the dataset, and chain them, in order to transform and reshape the data the way you want it.
HiveSQL Tricks for A Better Life
This post is mainly a notebook I use to record some practical HiveSQL tricks during daily work. Hopefully it will also make your life easier.
Fetch Data from PostgreSQL Databases in Python
We use pandas and psycopg2
together to connect with PostgreSQL. psycopg2
is a package allows us to create a connection with PostgreSQL databases in Python, and we will use sqlio
within pandas
to interact with the database.