Query pandas dataframes!! #python #sql #datascience #pandas #dataanalytics #pythonprogramming

preview_player
Показать описание
In this Short, I demonstrate how to "query" dataframes with Python using the pandas .loc property.

Source code:

# Libraries
import pandas as pd
import sqlalchemy
from sqlalchemy import create_engine

# Creating SQL Alchemy engine object

# Initiailizing connection to database

sql = 'SELECT * FROM players'

# creating a dataframe

# creating a dataframe where country equals 'us'

# updating the dataframe to encompass countries that contain 'us'
Рекомендации по теме
welcome to shbcf.ru