Loading A CSV Into pandas in Python

 

import modules

import pandas as pd
import numpy as np

Create dataframe (that we will be importing)

raw_data = {'first_name': ['Jason', 'Molly', 'Tina', 'Jake', 'Amy'], 
        'last_name': ['Miller', 'Jacobson', ".", 'Milner', 'Cooze'], 
        'age': [42, 52, 36, 24, 73], 
        'preTestScore': [4, 24, 31, ".", "."],
        'postTestScore': ["25,000", "94,000", 57, 62, 70]}
df = pd.DataFrame(raw_data, columns = ['first_name', 'last_name', 'age', 'preTestScore', 'postTestScore'])
df

 

Source: https://chrisalbon.com/python/data_wrangling/pandas_dataframe_importing_csv/