Removing/manipulating data from csv file based on their value

32 Views Asked by At

I have a large csv data to process and plot as figures. Unfortunately I have several data points that I don't necessarily need and I want to filer out. For example I need to filter out rows/data points that has a cell value in column 'distance' that is less then 400.

data = pd.read_csv('csv.file')
fig = plt.figure()
x = data['Time']
y1 =data[data['Distance']<400]
plt.show()

Unfortunately it returns a blank graph with an error: TypeError: unhashable type: 'numpy.ndarray'

I've tried the one above but returns an error as well as a blank graph.

What's the best way to filter out unwanted data in csv for plotting purposes?

0

There are 0 best solutions below