In here, i want to ask how to remove bracket of a array in python. This is my following code:
import pandas as pd
import numpy as np
df = pd.read_csv('data.csv', index_col=0, header=0)
X = np.array(df.ix[:,0:29])
Y = np.array(df.ix[:,29:30])
Y
Out[55]:
array([[ 1],
[ 2],
[ 3],
...,
[35],
[36],
[37]], dtype=int64)
The desired output is following below:
Y
Out[55]:
array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10,....])
I already tried to use np.array, however it did not work.