Simple question about Python

Hello everyone,

I have a simple question. I was reading this code when something completely unrelated came up into my head:

df = pd.read_csv(“results.csv”)
ax = plt.subplot(),
df[“Mean Satisfaction”])
plt.ylabel(“Mean Satisfaction”)

What is the difference between calling a df row in this way:

df[“Mean Satisfaction”]

and this way:


I believe what you are referring to are Columns and not the row.
And I think there is no much difference. However sometimes calling the columns by would be good if there is any space contain in the header of the columns.

1 Like

Yes, my bad. I meant columns. Thanks for the answer really helpful!