I imported a dataset for a machine learning project. I need each "Neuron" in my first input layer to contain one digital piece of data. However, I could not do this. Here is my code:
import math import numpy as np import pandas as pd; v = pd.read_csv('atestred.csv', error_bad_lines=False).values rw = 1 print(v) for x in range(0,10): rw += 1 s = (v[rw]) list(s)
Ideally, I would like this option when the code creates a new variable for each new row that it extracts from the data (which I try to do in the first loop), and a new variable for each extracted piece of data from each row (what I try to do in class and in the second cycle).
If I completely lost the point with my code, then feel free to point me in the right direction for a complete rewrite.
Here are the first few lines of my dataset:
fixed acidity;"volatile acidity";"citric acid";"residual sugar";"chlorides";"free sulfur dioxide";"total sulfur dioxide";"density";"pH";"sulphates";"alcohol";"quality" 7.4;0.7;0;1.9;0.076;11;34;0.9978;3.51;0.56;9.4;5 7.8;0.88;0;2.6;0.098;25;67;0.9968;3.2;0.68;9.8;5 7.8;0.76;0.04;2.3;0.092;15;54;0.997;3.26;0.65;9.8;5
Thanks in advance.
source share