@@ -864,12 +864,17 @@ def iterrows(self):
864
864
data types, the iterator returns a copy and not a view, and writing
865
865
to it will have no effect.
866
866
867
- Returns
868
- -------
867
+ Yields
868
+ ------
869
+ index : label or tuple of label
870
+ The index of the row. A tuple for a `MultiIndex`.
871
+ data : Series
872
+ The data of the row as a Series.
873
+
869
874
it : generator
870
875
A generator that iterates over the rows of the frame.
871
876
872
- See also
877
+ See Also
873
878
--------
874
879
itertuples : Iterate over DataFrame rows as namedtuples of the values.
875
880
iteritems : Iterate over (column name, Series) pairs.
@@ -3951,6 +3956,10 @@ def set_index(self, keys, drop=True, append=False, inplace=False,
3951
3956
necessary. Setting to False will improve the performance of this
3952
3957
method
3953
3958
3959
+ Returns
3960
+ -------
3961
+ DataFrame
3962
+
3954
3963
Examples
3955
3964
--------
3956
3965
>>> df = pd.DataFrame({'month': [1, 4, 7, 10],
@@ -3991,10 +4000,6 @@ def set_index(self, keys, drop=True, append=False, inplace=False,
3991
4000
2 2014 4 40
3992
4001
3 2013 7 84
3993
4002
4 2014 10 31
3994
-
3995
- Returns
3996
- -------
3997
- dataframe : DataFrame
3998
4003
"""
3999
4004
inplace = validate_bool_kwarg (inplace , 'inplace' )
4000
4005
if not isinstance (keys , list ):
@@ -6694,6 +6699,15 @@ def round(self, decimals=0, *args, **kwargs):
6694
6699
of `decimals` which are not columns of the input will be
6695
6700
ignored.
6696
6701
6702
+ Returns
6703
+ -------
6704
+ DataFrame
6705
+
6706
+ See Also
6707
+ --------
6708
+ numpy.around
6709
+ Series.round
6710
+
6697
6711
Examples
6698
6712
--------
6699
6713
>>> df = pd.DataFrame(np.random.random([3, 3]),
@@ -6719,15 +6733,6 @@ def round(self, decimals=0, *args, **kwargs):
6719
6733
first 0.0 1 0.17
6720
6734
second 0.0 1 0.58
6721
6735
third 0.9 0 0.49
6722
-
6723
- Returns
6724
- -------
6725
- DataFrame object
6726
-
6727
- See Also
6728
- --------
6729
- numpy.around
6730
- Series.round
6731
6736
"""
6732
6737
from pandas .core .reshape .concat import concat
6733
6738
@@ -6793,7 +6798,6 @@ def corr(self, method='pearson', min_periods=1):
6793
6798
6794
6799
Examples
6795
6800
--------
6796
- >>> import numpy as np
6797
6801
>>> histogram_intersection = lambda a, b: np.minimum(a, b
6798
6802
... ).sum().round(decimals=1)
6799
6803
>>> df = pd.DataFrame([(.2, .3), (.0, .6), (.6, .0), (.2, .1)],
0 commit comments