all AI news
Load Pokemon data into Postgres
Dec. 11, 2023, 10:25 a.m. | Kaushik Varanasi
DEV Community dev.to
Load the Pokemon data
Let's load the Pokemon data from the open-source db. We'll need a small standalone Python project for that.
Create a folder called pokemon-python
and a file named load_pokemon.py
:
import pandas as pd
from sqlalchemy import create_engine
engine = create_engine('postgresql://postgres:password@xxxxx.xxxxx.us-east-2.rds.amazonaws.com:5432/postgres')
df=pd.read_csv('https://raw.githubusercontent.com/veekun/pokedex/master/pokedex/data/csv/pokemon.csv')
df.to_sql('pokemon', engine)
cd pokemon-python
# create a venv
pip install virtualenv
python3 -m …
data east import install pandas password pip pokemon postgres postgresql project python python3 rds small sqlalchemy venv
More from dev.to / DEV Community
Jobs in AI, ML, Big Data
Data Architect
@ University of Texas at Austin | Austin, TX
Data ETL Engineer
@ University of Texas at Austin | Austin, TX
Lead GNSS Data Scientist
@ Lurra Systems | Melbourne
Senior Machine Learning Engineer (MLOps)
@ Promaton | Remote, Europe
Principal Applied Scientist
@ Microsoft | Redmond, Washington, United States
Data Analyst / Action Officer
@ OASYS, INC. | OASYS, INC., Pratt Avenue Northwest, Huntsville, AL, United States