Jul-28-2020, 01:01 AM
I am a newbie in deep learning and try to make feature matrix with python. My sample data structure is like below,
dataset.csv
dataset.csv
State Earnings Hispanic Indian Asian Black White people_in_poverty Alabama 0.2 0.4 0.6 0.6 0.2 0.8 a.csv Florida 0.5 0.6 0.4 0.1 0.6 0.7 b.csv Kentucky 0.7 0.7 0.9 0.8 0.3 0.6 c.csv Minnesota 0.3 0.1 0.2 0.5 0.2 0.7 d.csv ....The column names
[Earnings, Hispanic, Indian, Asian, Black, White]
are the attributes and people_in_poverty
is the class of feature matrix. When the value of people_in_poverty
is numeric, the python codes are simple.people_in_poverty 0.7 0.3 0.2 0.6
import pandas as pd df = pd.read_csv('dataset.csv', names=['state', 'Earnings', 'Hispanic', 'Indian', 'Asian', 'Black', 'White', 'people_in_poverty']) dataset = df.valuesHowever, in my case, the class of feature matrix has csv file which includes the times series data.
people_in_poverty a.csv b.csv c.csv d.csv
a.csv 2010-08-27 0.2 2010-09-27 0.7 2010-10-27 0.6 2010-11-27 0.9 2010-12-27 0.4 2011-01-27 0.8 2011-02-27 0.5 2011-03-27 0.3Then I want to know how to modify my
pd.read_csv()
python codes. The class of the feature matrix is not the numeric value, but csv file containing the time series values. Any advice is needed. Thanks in advanced.