I want to get all the fields from the csv which are numerical fields and store those field in an array so that i can perform mathematical operations. I can get the data types but not able to restrict. I am very new to python scripting, please help
Edit: I have added one sample row
so here F1 and F3 are the numerical fields. So i want to keep these two field names in an array variable FieldNames=["F1","F3"]
import csv
import pandas as pd
import numpy as np
data = pd.read_csv(r'C:\Users\spanda031\Downloads\test_19.csv')
print(data.dtypes)
with open(r'C:\Users\spanda031\Downloads\test_19.csv') as f:
d_reader = csv.DictReader(f)
#get fieldnames from DictReader object and store in list
headers = d_reader.fieldnames
print(headers)
for line in headers:
#print value in MyCol1 for each row
print(line)
v3=np.array(data[line])
