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

Todd Birchard on February 09, 2019

Let’s face it: the last thing the world needs is another “ Intro to Pandas ” post. Anybody strange enough to read this blog surely had the same... [Read Full]
markdown guide

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)

code of conduct - report abuse