Selecting Multiple rows using numpy

I am currently under https://app.dataquest.io/m/289/introduction-to-numpy/8/vector-math-continued section.

I was trying to run the same code with same data set it is generating wrong output.

To be specific I am trying to select rows from a ndarray and when I print that row its showing unexpected data.

however when I selected column its showing correct output. I am not able to understand that.

Can you show the full code you used when selecting the column?

1 Like

taxi_list = taxi_list[1:]

convert all values to floats

converted_taxi_list = []
for row in taxi_list:
converted_row = []
for item in row:
converted_row.append(float(item))
converted_taxi_list.append(converted_row)
taxi = np.array(converted_taxi_list)
print(type(taxi))

row = taxi[1]
print(row0

Let me take a look at this 1st thing in the morning

So I think this is setup to only work with columns and not rows