如何用python读取csv文件并画图_如何从单个目录读取多个csv文件并在Python中分别对其进行图形处理?...

I want to read csv files from a directory and plot them and be able to click the arrow button to step through a plot and look at a different plot. I want to specify which column and be able to title it as well as I have in the code below as well.

I am able to read the csv file and plot a single plot with specific columns but I am not sure how to do it with multiple. I've tried glob but it didn't work, I do not want to concatenate them to a single csv file. I have provided my code below. Any help would be appreciated. Thank you.

import pandas as pd

import matplotlib.pyplot as plt

cols_in = [1, 3]

col_name = ['Time (s), Band (mb)']

df = pd.read_csv("/user/Desktop/TestNum1.csv", usecols = cols_in, names =

col_name, header = None)

fig, ax = plt.subplots()

my_scatter_plot = ax

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值