I'm trying to import data from csv file and I get two different types of arrays when I use pandas' read function and numpy's getfromtxt resulting in two different arrays:
[[ 1. 0. 1. ..., 1. 0. 0.]
[ 0. 1. 1. ..., 1. 0. 0.]
[ 0. 1. 1. ..., 1. 0. 0.]
...,
[ 0. 1. 1. ..., 1. 0. 0.]
[ 1. 0. 1. ..., 1. 0. 0.]
[ 1. 0. 1. ..., 1. 0. 0.]]
When I use the following line of code:
from numpy import genfromtxt
df = genfromtxt('C:/Users/m15x/Desktop/UFABC/PDPD/inputX(editado_bits).csv', delimiter=',')
X = df
print(X)
And:
[[1 0 1 ..., 1 0 0]
[0 1 1 ..., 1 0 0]
[0 1 1 ..., 1 0 0]
...,
[1 0 1 ..., 1 0 0]
[1 0 1 ..., 0 0 1]
[1 0 1 ..., 1 0 0]]
When I use the this line of code:
import pandas as pd
df = pd.read_csv('C:/Users/m15x/Desktop/UFABC/PDPD/input(editado_bits).csv')
X1 = df.loc[0:86,'Initiation (Gradual)' : 'Otoscopy (cerumen)']
X = X1.values
print(X)
What is the difference between them?