Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python csv file plot column

import pandas as pd
from matplotlib import pyplot as plt
plt.rcParams["figure.figsize"] = [7.00, 3.50]
plt.rcParams["figure.autolayout"] = True
columns = ["Name", "Marks"]
df = pd.read_csv("input.csv", usecols=columns)
print("Contents in csv file:
", df)
plt.plot(df.Name, df.Marks)
plt.show()
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #python #csv #file #plot #column
ADD COMMENT
Topic
Name
3+1 =