Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to plot graph using csv file in python

import matplotlib.pyplot as plt
import numpy as np

dataArray = np.genfromtxt('data.csv', delimiter=',', names=True)

plt.figure()
for col_name in dataArray.dtype.names:
    plt.plot(dataArray[col_name], label=col_name)
plt.legend()
plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: how to create dataframe in python 
Python :: python split pdf pages 
Python :: install python glob module in windows 
Python :: python sort dictionary alphabetically by key 
Python :: update tensorflow pip 
Python :: get website content with beautifulsoup 
Python :: python join array of ints 
Python :: open image from link python 
Python :: find the item with the maximum number of occurrences in a list in Python 
Python :: display Max rows in a pandas dataframe 
Python :: pandas print first column 
Python :: np array n same values 
Python :: print current time hours and minutes in python 
Python :: how to make a python exe 
Python :: discord py on ready 
Python :: python datetime now only hour and minute 
Python :: python ftp upload file 
Python :: python selenium scroll all down 
Python :: how to get input in tkinter 
Python :: how to create correlation heatmap in python 
Python :: reverse dictionary python 
Python :: How to convert an integer number into words in python? 
Python :: create virtualenv in pythonanywhere 
Python :: python what does yield do 
Python :: shift elements in list python 
Python :: pip install apache beam gcp 
Python :: rename column name pandas dataframe 
Python :: import randomforestclassifier 
Python :: django get superuser password 
Python :: python random.choices vs random.sample 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =