Skip to content

Commit 2aacee7

Browse files
committed
doc test fix
1 parent ffae63e commit 2aacee7

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

doc/source/user_guide/indexing.rst

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -710,25 +710,6 @@ When applied to a DataFrame, you can use a column of the DataFrame as sampling w
710710
(provided you are sampling rows and not columns) by simply passing the name of the column
711711
as a string.
712712

713-
.. ipython:: python
714-
715-
df2 = pd.DataFrame({'col1': [9, 8, 7, 6],
716-
'weight_column': [0.5, 0.4, 0.1, 0]})
717-
df2.sample(n=2, weights='weight_column')
718-
719-
``sample`` also allows users to sample columns instead of rows using the ``axis`` argument.
720-
721-
.. ipython:: python
722-
723-
df4 = pd.DataFrame({'col1': [1, 2, 3], 'col2': [2, 3, 4]})
724-
725-
# With a given seed, the sample will always draw the same rows.
726-
df4.sample(n=2, random_state=2)
727-
df4.sample(n=2, random_state=2)
728-
729-
730-
731-
Setting with enlargement
732713
------------------------
733714

734715
The ``.loc/[]`` operations can perform enlargement when setting a non-existent key for that axis.

0 commit comments

Comments
 (0)