We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c0c778b commit 8b6c64eCopy full SHA for 8b6c64e
doc/source/user_guide/10min.rst
@@ -178,12 +178,26 @@ Getitem (``[]``)
178
~~~~~~~~~~~~~~~~
179
180
For a :class:`DataFrame`, passing a single label selects a column and
181
-yields a :class:`Series` equivalent to ``df.A``:
+yields a :class:`Series`:
182
183
.. ipython:: python
184
185
df["A"]
186
187
+If the label only contains letters, numbers, and underscores, you can
188
+alternatively use dot notation:
189
+
190
+.. ipython:: python
191
192
+ df.A
193
194
+Passing a list of column labels selects multiple columns, which can be useful
195
+for getting a subset/rearranging:
196
197
198
199
+ df[["B", "A"]]
200
201
For a :class:`DataFrame`, passing a slice ``:`` selects matching rows:
202
203
0 commit comments