all InfoSec 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 …
called data engine file folder import install pandas password pip pokemon postgres postgresql project python python3 rds
More from dev.to / DEV Community
Jobs in InfoSec / Cybersecurity
CyberSOC Technical Lead
@ Integrity360 | Sandyford, Dublin, Ireland
Cyber Security Strategy Consultant
@ Capco | New York City
Cyber Security Senior Consultant
@ Capco | Chicago, IL
Sr. Product Manager
@ MixMode | Remote, US
Security Compliance Strategist
@ Grab | Petaling Jaya, Malaysia
Cloud Security Architect, Lead
@ Booz Allen Hamilton | USA, VA, McLean (1500 Tysons McLean Dr)