Basics - How to read a CSV file in python (and plot it)

preview_player
Показать описание


------------ Code ----------

import pandas as pd

t = df[0]
v = df[1]

# make a plot
from matplotlib import pyplot as plt

-----------------------

Keywords: text file , csv file , pandas , python , jupyter notebook , read file , plot , graphic , matplotlib , pyplot , scientific , data , science
Рекомендации по теме
Комментарии
Автор

You deserve subscribers.. and you will get them... just keep uploading :D

ionic_chemist
Автор

Thanks, thats exactly what I was looking for.

till
Автор

I've heard pyqtgraph is good on performance, but it couldn't keep up with the real-time data from a sensor. Appending a new sample every 100ms and redrawing worked for a few minutes, but it got progressively slower and was nowhere near real-time.

I'm hoping to change my luck with matplotlib.. any suggestions how to plot such that the display keeps up with the data? For example, appending to a csv file, and having matplotlib read it continuously seems like a bad idea. What other way can matplotlib work with a very large data arrays?

bennguyen
Автор

when i try t = df[0] it doesnt work and i dont know why

johntaxpayer