Need help calling a column

I have been working through the pandas/pyplot visualization exercises and wanted to apply my own data. I need to define my column data, but I have 144 rows. How do I call data for use in plotting? I am getting a NameError: name ‘price_sf’ is not defined. Here is the code I started with:

from matplotlib import pyplot as plt
import pandas as pd

mf_sales = pd.read_csv(r’C:\Users\richa\Documents\DC_MF_Sales_YOY.csv’)

price_sf = price_sf[0:-1]
size_price = size_price[0:-1]


The error occurs because you did not define price_sf - exactly what it stated.

Also, next time, please format your code. You can do this by wrapping it in triple backticks or by pressing the </> icon and pasting the code inside.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.