Wednesday, August 2, 2017

Python: reading the headers of the csv file

import numpy as np
import pandas as pd
#reading the data
hate_speech = pd.read_csv('labeled_data.csv')

for i, col in enumerate(hate_speech.columns):
    print(i, col)

No comments:

Post a Comment