@@ -701,7 +701,7 @@ def iterkv(self, *args, **kwargs):
701
701
"iteritems alias used to get around 2to3. Deprecated"
702
702
warnings .warn ("iterkv is deprecated and will be removed in a future "
703
703
"release, use ``iteritems`` instead." ,
704
- DeprecationWarning )
704
+ FutureWarning )
705
705
return self .iteritems (* args , ** kwargs )
706
706
707
707
def __len__ (self ):
@@ -2004,13 +2004,13 @@ def sample(self, n=None, frac=None, replace=False, weights=None, random_state=No
2004
2004
Sample with or without replacement. Default = False.
2005
2005
weights : str or ndarray-like, optional
2006
2006
Default 'None' results in equal probability weighting.
2007
- If passed a Series, will align with target object on index. Index
2007
+ If passed a Series, will align with target object on index. Index
2008
2008
values in weights not found in sampled object will be ignored and
2009
- index values in sampled object not in weights will be assigned
2010
- weights of zero.
2009
+ index values in sampled object not in weights will be assigned
2010
+ weights of zero.
2011
2011
If called on a DataFrame, will accept the name of a column
2012
2012
when axis = 0.
2013
- Unless weights are a Series, weights must be same length as axis
2013
+ Unless weights are a Series, weights must be same length as axis
2014
2014
being sampled.
2015
2015
If weights do not sum to 1, they will be normalized to sum to 1.
2016
2016
Missing values in the weights column will be treated as zero.
@@ -2040,8 +2040,8 @@ def sample(self, n=None, frac=None, replace=False, weights=None, random_state=No
2040
2040
if weights is not None :
2041
2041
2042
2042
# If a series, align with frame
2043
- if isinstance (weights , pd .Series ):
2044
- weights = weights .reindex (self .axes [axis ])
2043
+ if isinstance (weights , pd .Series ):
2044
+ weights = weights .reindex (self .axes [axis ])
2045
2045
2046
2046
# Strings acceptable if a dataframe and axis = 0
2047
2047
if isinstance (weights , string_types ):
0 commit comments