-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QST: difference using ['column'] or .column? #41629
Comments
Hello there, There is a external blog that details the differences and why or why not to use one of them If you can't see the post, open the link in incognito mode Basically:
|
that's a nice post |
take |
Hi all, I'm thinking of adding a line to the Attribute access section of the Indexing and selecting data page of the documentation. Unless I'm told otherwise, I'll probably go with:
|
As mentioned in #41645 (comment), this is already documented in https://pandas.pydata.org/pandas-docs/dev/user_guide/indexing.html#attribute-access. Closing |
Hi All,
I was wondering if you have any guidelines as to when it is possible to just go for df.column instead of df['column'], as I prefer the former for code styling, but I recall it gave me some issues before. I'm not sure I understand the specific difference between one and the other, is there any?
For now, what I do is only use ['column'] when declaring a new column and then always go for .column.
Thank you,
Iván.
The text was updated successfully, but these errors were encountered: