DEV Community

Discussion on: Yet Another Unsolicited "Intro to Data Analysis in Python Using Pandas" Post

Collapse
 
chenge profile image
chenge

after 3 symbol add 'python' to color

import pandas as pd

# Reads a local CSV file.
csv_df = pd.read_csv('data.csv')

# Similar to above
excel_df = pd.read_excel('data.xlsx')

# Creating tabular data from non-tabular JSON
json_df = pd.read_json('data.json')

# Direct db access utilizing SQLAlchemy
read_sql = read_sql('SELECT * FROM blah', conn=sqlalchemy_engine)

# My personal ridiculous favorite: HTML table to DataFrame.
read_html = read_html('examplePageWithTable.html)

# The strength of Google BigQuery: already officially supported by Pandas
read_gbq = read_gbq('SELECT * FROM test_dataset.test_table', projectid)

Collapse
 
toddbirchard profile image
Todd Birchard

u da real mvp <3