I am trying to extract data from a dummy csv file to use inside tensorflow. The dummy data only has 2 columns: X (single feature column) and Y (expected output).
X Y
11.0 13.0
23.0 33.3
... ... and so on
Right now I am reading the data like so:
import pandas as pd
dummy_data = pd.read_csv("dummy_data.csv", sep=",")
inputX = dummy_data.loc[:, 'X'].values
np.reshape(inputX, [11, 1])
I am reshaping the numpy array because I need to do matrix multiplication later on with linear regression but I want to ask is that the correct way to extract a column from csv data? Is there a better way to directly extract the csv data to a tensor object?