diff --git a/pandas/core/algorithms.py b/pandas/core/algorithms.py index b4d5c2352a3a0..d1092eb31774d 100644 --- a/pandas/core/algorithms.py +++ b/pandas/core/algorithms.py @@ -223,7 +223,7 @@ def quantile(x, q, interpolation_method='fraction'): score : float Score at percentile. - Examplesb + Examples -------- >>> from scipy import stats >>> a = np.arange(100) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index dc5c6c0f67307..39a29d982aa30 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -1161,7 +1161,7 @@ def to_excel(self, excel_writer, sheet_name='sheet1', na_rep='', sheet_name : string, default 'sheet1' Name of sheet which will contain DataFrame na_rep : string, default '' - Missing data rep'n + Missing data representation cols : sequence, optional Columns to write header : boolean or list of string, default True @@ -4303,7 +4303,7 @@ def _reduce(self, op, axis=0, skipna=True, numeric_only=None, def idxmin(self, axis=0, skipna=True): """ - Return index of first occurence of minimum over requested axis. + Return index of first occurrence of minimum over requested axis. NA/null values are excluded. Parameters @@ -4325,7 +4325,7 @@ def idxmin(self, axis=0, skipna=True): def idxmax(self, axis=0, skipna=True): """ - Return index of first occurence of maximum over requested axis. + Return index of first occurrence of maximum over requested axis. NA/null values are excluded. Parameters diff --git a/pandas/core/groupby.py b/pandas/core/groupby.py index 6ed4e9aa822b9..5fd640c3c89e4 100644 --- a/pandas/core/groupby.py +++ b/pandas/core/groupby.py @@ -74,7 +74,7 @@ class GroupBy(object): ----- After grouping, see aggregate, apply, and transform functions. Here are some other brief notes about usage. When grouping by multiple groups, the - result index will be a MultiIndex (hierarhical) by default. + result index will be a MultiIndex (hierarchical) by default. Iteration produces (key, group) tuples, i.e. chunking the data by group. So you can write code like: diff --git a/pandas/core/index.py b/pandas/core/index.py index 72b2e95918c11..5bd3a62ecf680 100644 --- a/pandas/core/index.py +++ b/pandas/core/index.py @@ -2291,7 +2291,7 @@ def insert(self, loc, item): new_index : Index """ if not isinstance(item, tuple) or len(item) != self.nlevels: - raise Exception("%s cannot be inserted in this MultIndex" + raise Exception("%s cannot be inserted in this MultiIndex" % str(item)) new_levels = [] diff --git a/pandas/core/panel.py b/pandas/core/panel.py index 6b1af14e0a41c..dda8cf1131b0e 100644 --- a/pandas/core/panel.py +++ b/pandas/core/panel.py @@ -487,7 +487,7 @@ def to_excel(self, path, na_rep=''): excel_writer : string or ExcelWriter object File path or existing ExcelWriter na_rep : string, default '' - Missing data rep'n + Missing data representation """ from pandas.io.parsers import ExcelWriter writer = ExcelWriter(path) diff --git a/pandas/core/series.py b/pandas/core/series.py index 1dbc240e7decc..e3873ed08f4fd 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -752,7 +752,7 @@ def set_value(self, label, value): def reset_index(self, drop=False, name=None): """ - Analagous to the DataFrame.reset_index function, see docstring there. + Analogous to the DataFrame.reset_index function, see docstring there. Parameters ---------- @@ -1139,7 +1139,7 @@ def _agg_by_level(self, name, level=0, skipna=True, **kwds): def idxmin(self, axis=None, out=None, skipna=True): """ - Index of first occurence of minimum of values. + Index of first occurrence of minimum of values. Parameters ---------- @@ -1148,7 +1148,7 @@ def idxmin(self, axis=None, out=None, skipna=True): Returns ------- - idxmin : Index of mimimum of values + idxmin : Index of minimum of values """ i = nanops.nanargmin(self.values, skipna=skipna) if i == -1: @@ -1157,7 +1157,7 @@ def idxmin(self, axis=None, out=None, skipna=True): def idxmax(self, axis=None, out=None, skipna=True): """ - Index of first occurence of maximum of values. + Index of first occurrence of maximum of values. Parameters ---------- @@ -1166,7 +1166,7 @@ def idxmax(self, axis=None, out=None, skipna=True): Returns ------- - idxmax : Index of mimimum of values + idxmax : Index of minimum of values """ i = nanops.nanargmax(self.values, skipna=skipna) if i == -1: @@ -1757,7 +1757,7 @@ def order(self, na_last=True, ascending=True, kind='mergesort'): Sort ascending. Passing False sorts descending kind : {'mergesort', 'quicksort', 'heapsort'}, default 'mergesort' Choice of sorting algorithm. See np.sort for more - information. 'mergesort' is the only stable algorith + information. 'mergesort' is the only stable algorithm Returns ------- @@ -2341,7 +2341,7 @@ def to_csv(self, path, index=True, sep=",", na_rep='', header=False, ---------- path : string file path or file handle / StringIO na_rep : string, default '' - Missing data rep'n + Missing data representation header : boolean, default False Write out series name index : boolean, default True @@ -2465,7 +2465,7 @@ def asof(self, where): Parameters ---------- - wehre : date or array of dates + where : date or array of dates Notes ----- diff --git a/pandas/core/strings.py b/pandas/core/strings.py index 6541906d5a79b..3e67449fad481 100644 --- a/pandas/core/strings.py +++ b/pandas/core/strings.py @@ -417,7 +417,7 @@ def str_findall(arr, pat, flags=0): Parameters ---------- pat : string - Pattern or regular expressino + Pattern or regular expression flags : int, default 0 (no flags) re module flags, e.g. re.IGNORECASE diff --git a/pandas/sparse/frame.py b/pandas/sparse/frame.py index d001f28ed4666..e89df3e8ed131 100644 --- a/pandas/sparse/frame.py +++ b/pandas/sparse/frame.py @@ -253,7 +253,7 @@ def density(self): return tot_nonsparse / float(tot) #---------------------------------------------------------------------- - # Support different internal rep'n of SparseDataFrame + # Support different internal representation of SparseDataFrame def _set_item(self, key, value): sp_maker = lambda x: SparseSeries(x, index=self.index, diff --git a/pandas/stats/misc.py b/pandas/stats/misc.py index 7e5419b79e277..2f3b4d7f5a10d 100644 --- a/pandas/stats/misc.py +++ b/pandas/stats/misc.py @@ -141,7 +141,7 @@ def bucketcat(series, cats): ---------- series : Series cat : Series or same-length array - bucket by category; mutually exxlusive with 'by' + bucket by category; mutually exclusive with 'by' Returns ------- @@ -175,7 +175,7 @@ def bucketpanel(series, bins=None, by=None, cat=None): by : tuple of Series bucket by value cat : tuple of Series - bucket by category; mutually exxlusive with 'by' + bucket by category; mutually exclusive with 'by' Returns ------- diff --git a/pandas/tools/plotting.py b/pandas/tools/plotting.py index 47c2d414cce37..b95aef1f91780 100644 --- a/pandas/tools/plotting.py +++ b/pandas/tools/plotting.py @@ -38,7 +38,7 @@ def scatter_matrix(frame, alpha=0.5, figsize=None, ax=None, grid=False, grid : setting this to True will show the grid diagonal : pick between 'kde' and 'hist' for either Kernel Density Estimation or Histogram - plon in the diagonal + plot in the diagonal kwds : other plotting keyword arguments To be passed to scatter function @@ -1304,7 +1304,7 @@ def plot_series(series, label=None, kind='line', use_index=True, rot=None, def boxplot(data, column=None, by=None, ax=None, fontsize=None, rot=0, grid=True, figsize=None, **kwds): """ - Make a box plot from DataFrame column optionally grouped b ysome columns or + Make a box plot from DataFrame column optionally grouped by some columns or other inputs Parameters @@ -1733,7 +1733,7 @@ def _subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True, - for NxM subplots with N>1 and M>1 are returned as a 2d array. If False, no squeezing at all is done: the returned axis object is always - a 2-d array contaning Axis instances, even if it ends up being 1x1. + a 2-d array containing Axis instances, even if it ends up being 1x1. subplot_kw : dict Dict with keywords passed to the add_subplot() call used to create each @@ -1753,7 +1753,7 @@ def _subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True, fig, ax : tuple - fig is the Matplotlib Figure object - ax can be either a single axis object or an array of axis objects if - more than one supblot was created. The dimensions of the resulting array + more than one subplot was created. The dimensions of the resulting array can be controlled with the squeeze keyword, see above. **Examples:** diff --git a/pandas/tseries/frequencies.py b/pandas/tseries/frequencies.py index e64eebc15bed9..e0bdcf754439a 100644 --- a/pandas/tseries/frequencies.py +++ b/pandas/tseries/frequencies.py @@ -703,7 +703,7 @@ def infer_freq(index, warn=True): Returns ------- freq : string or None - None if no discernable frequency + None if no discernible frequency """ from pandas.tseries.index import DatetimeIndex diff --git a/pandas/tseries/index.py b/pandas/tseries/index.py index 857168db4bf64..4d740193014f8 100644 --- a/pandas/tseries/index.py +++ b/pandas/tseries/index.py @@ -602,7 +602,7 @@ def order(self, return_indexer=False, ascending=True): def snap(self, freq='S'): """ - Snap time stamps to nearest occuring frequency + Snap time stamps to nearest occurring frequency """ # Superdumb, punting on any optimizing diff --git a/pandas/tseries/offsets.py b/pandas/tseries/offsets.py index 68adf2d530f20..cb409290d067d 100644 --- a/pandas/tseries/offsets.py +++ b/pandas/tseries/offsets.py @@ -529,7 +529,7 @@ class WeekOfMonth(DateOffset, CacheableOffset): 0 is 1st week of month, 1 2nd week, etc. weekday : {0, 1, ..., 6} 0: Mondays - 1: Tuedays + 1: Tuesdays 2: Wednesdays 3: Thursdays 4: Fridays