Skip to content

Instantly share code, notes, and snippets.

@marcelmaatkamp
Last active January 31, 2023 19:56
Show Gist options
  • Save marcelmaatkamp/23af16aababf8efe5ce00c62573c8f80 to your computer and use it in GitHub Desktop.
Save marcelmaatkamp/23af16aababf8efe5ce00c62573c8f80 to your computer and use it in GitHub Desktop.
---
from sqlalchemy import create_engine
engine = create_engine('postgresql://postgres:postgres@postgres:5432/postgres', echo=False)
---
import pandas as pd
with engine.connect() as connection:
df = pd.read_sql('ais', connection)
df
---
import seaborn as sns
# Apply the default theme
sns.set_theme()
# Load an example dataset
tips = sns.load_dataset("tips")
# Create a visualization
sns.relplot(
data=df,
x="total_bill", y="tip", col="time",
hue="smoker", style="smoker", size="size",
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment