expandas.core package¶
Submodules¶
- class expandas.core.accessor.AccessorMethods(df, module_name=None, attrs=None)¶
Bases: object
Accessor to related functionalities.
- class expandas.core.frame.ModelFrame(data, target=None, *args, **kwargs)¶
Bases: pandas.core.frame.DataFrame
Data structure subclassing pandas.DataFrame to define a metadata to specify target (response variable) and data (explanatory variable / features).
Parameters: data : same as pandas.DataFrame
target : str or array-like
Column name or values to be used as target
args : arguments passed to pandas.DataFrame
kwargs : keyword arguments passed to pandas.DataFrame
Attributes
T Transpose index and columns at axes blocks Internal property, property synonym for as_blocks() cluster Property to access sklearn.cluster. covariance Property to access sklearn.covariance. cross_decomposition Property to access sklearn.cross_decomposition cross_validation Property to access sklearn.cross_validation. crv Property to access sklearn.cross_validation. data Return data (explanatory variable / features) decision Return current estimator’s decision function decomposition Property to access sklearn.decomposition dtypes Return the dtypes in this object dummy Property to access sklearn.dummy empty True if NDFrame is entirely empty [no items] ensemble Property to access sklearn.ensemble. estimator Return most recently used estimator feature_extraction Property to access sklearn.feature_extraction. feature_selection Property to access sklearn.feature_selection. ftypes Return the ftypes (indication of sparse/dense and dtype) in this object. gaussian_process Property to access sklearn.gaussian_process. grid_search Property to access sklearn.grid_search. iat iloc isotonic Property to access sklearn.isotonic. ix kernel_approximation Property to access sklearn.kernel_approximation lda Property to access sklearn.lda learning_curve Property to access sklearn.learning_curve. linear_model Property to access sklearn.linear_model. lm Property to access sklearn.linear_model. loc log_proba Return current estimator’s log probabilities manifold Property to access sklearn.manifold. metrics Property to access sklearn.metrics. mixture Property to access sklearn.mixture multiclass Property to access sklearn.multiclass. naive_bayes Property to access sklearn.naive_bayes ndim Number of axes / array dimensions neighbors Property to access sklearn.neighbors. neural_network Property to access sklearn.neural_network pipeline Property to access sklearn.pipeline. pp Property to access sklearn.preprocessing. predicted Return current estimator’s predicted results preprocessing Property to access sklearn.preprocessing. proba Return current estimator’s probabilities qda Property to access sklearn.qda random_projection Property to access sklearn.random_projection. semi_supervised Property to access sklearn.semi_supervised. shape size number of elements in the NDFrame svm Property to access sklearn.svm. target Return target (response variable) target_name Return target column name tree Property to access sklearn.tree values Numpy representation of NDFrame is_copy Methods
abs() Return an object with absolute value taken. add(other[, axis, level, fill_value]) Binary operator add with support to substitute a fill_value for missing data in add_prefix(prefix) Concatenate prefix string with panel items names. add_suffix(suffix) Concatenate suffix string with panel items names align(other[, join, axis, level, copy, ...]) Align two object on their axes with the all([axis, bool_only, skipna, level]) Return whether all elements are True over requested axis any([axis, bool_only, skipna, level]) Return whether any element is True over requested axis append(other[, ignore_index, verify_integrity]) Append columns of other to end of this frame’s columns and index, returning a new object. apply(func[, axis, broadcast, raw, reduce, args]) Applies function along input axis of DataFrame. applymap(func) Apply a function to a DataFrame that is intended to operate elementwise, i.e. as_blocks() Convert the frame to a dict of dtype -> Constructor Types that each has a homogeneous dtype. as_matrix([columns]) Convert the frame to its Numpy-array representation. asfreq(freq[, method, how, normalize]) Convert all TimeSeries inside to specified frequency using DateOffset objects. astype(dtype[, copy, raise_on_error]) Cast object to input numpy.dtype at_time(time[, asof]) Select values at particular time of day (e.g. between_time(start_time, end_time[, ...]) Select values between particular times of the day (e.g., 9:00-9:30 AM) bfill([axis, inplace, limit, downcast]) Synonym for NDFrame.fillna(method=’bfill’) bool() Return the bool of a single element PandasObject boxplot([column, by, ax, fontsize, rot, ...]) Make a box plot from DataFrame column optionally grouped by some columns or clip([lower, upper, out]) Trim values at input threshold(s) clip_lower(threshold) Return copy of the input with values below given value truncated clip_upper(threshold) Return copy of input with values above given value truncated combine(other, func[, fill_value, overwrite]) Add two DataFrame objects and do not propagate NaN values, so if for a combineAdd(other) Add two DataFrame objects and do not propagate combineMult(other) Multiply two DataFrame objects and do not propagate NaN values, so if combine_first(other) Combine two DataFrame objects and default to non-null values in frame calling the method. compound([axis, skipna, level]) Return the compound percentage of the values for the requested axis consolidate([inplace]) Compute NDFrame with “consolidated” internals (data of each dtype grouped together in a single ndarray). convert_objects([convert_dates, ...]) Attempt to infer better dtype for object columns copy([deep]) Make a copy of this object corr([method, min_periods]) Compute pairwise correlation of columns, excluding NA/null values corrwith(other[, axis, drop]) Compute pairwise correlation between rows or columns of two DataFrame objects. count([axis, level, numeric_only]) Return Series with number of non-NA/null observations over requested axis. cov([min_periods]) Compute pairwise covariance of columns, excluding NA/null values cummax([axis, dtype, out, skipna]) Return cumulative max over requested axis. cummin([axis, dtype, out, skipna]) Return cumulative min over requested axis. cumprod([axis, dtype, out, skipna]) Return cumulative prod over requested axis. cumsum([axis, dtype, out, skipna]) Return cumulative sum over requested axis. decision_function(estimator, *args, **kwargs) Call estimator’s decision_function method. describe([percentile_width, percentiles, ...]) Generate various summary statistics, excluding NaN values. diff([periods]) 1st discrete difference of object div(other[, axis, level, fill_value]) Binary operator truediv with support to substitute a fill_value for missing data in divide(other[, axis, level, fill_value]) Binary operator truediv with support to substitute a fill_value for missing data in dot(other) Matrix multiplication with DataFrame or Series objects drop(labels[, axis, level, inplace]) Return new object with labels in requested axis removed drop_duplicates(*args, **kwargs) Return DataFrame with duplicate rows removed, optionally only dropna([axis, how, thresh, subset, inplace]) Return object with labels on given axis omitted where alternately any duplicated(*args, **kwargs) Return boolean Series denoting duplicate rows, optionally only eq(other[, axis, level]) Wrapper for flexible comparison methods eq equals(other) Determines if two NDFrame objects contain the same elements. eval(expr, **kwargs) Evaluate an expression in the context of the calling DataFrame instance. ffill([axis, inplace, limit, downcast]) Synonym for NDFrame.fillna(method=’ffill’) fillna([value, method, axis, inplace, ...]) Fill NA/NaN values using the specified method filter([items, like, regex, axis]) Restrict the info axis to set of items or wildcard first(offset) Convenience method for subsetting initial periods of time series data first_valid_index() Return label for first non-NA/null value fit(estimator, *args, **kwargs) Call estimator’s fit method. fit_predict(estimator, *args, **kwargs) Call estimator’s fit_predict method. fit_transform(estimator, *args, **kwargs) Call estimator’s fit_transform method. floordiv(other[, axis, level, fill_value]) Binary operator floordiv with support to substitute a fill_value for missing data in from_csv(path[, header, sep, index_col, ...]) Read delimited file into DataFrame from_dict(data[, orient, dtype]) Construct DataFrame from dict of array-like or dicts from_items(items[, columns, orient]) Convert (key, value) pairs to DataFrame. from_records(data[, index, exclude, ...]) Convert structured or record ndarray to DataFrame ge(other[, axis, level]) Wrapper for flexible comparison methods ge get(key[, default]) Get item from object for given key (DataFrame column, Panel slice, etc.). get_dtype_counts() Return the counts of dtypes in this object get_ftype_counts() Return the counts of ftypes in this object get_value(index, col[, takeable]) Quickly retrieve single value at passed column and index get_values() same as values (but handles sparseness conversions) groupby([by, axis, level, as_index, sort, ...]) Group series using mapper (dict or key function, apply given function gt(other[, axis, level]) Wrapper for flexible comparison methods gt has_data() Return whether ModelFrame has data has_target() Return whether ModelFrame has target head([n]) Returns first n rows hist(data[, column, by, grid, xlabelsize, ...]) Draw histogram of the DataFrame’s series using matplotlib / pylab. icol(i) idxmax([axis, skipna]) Return index of first occurrence of maximum over requested axis. idxmin([axis, skipna]) Return index of first occurrence of minimum over requested axis. iget_value(i, j) info([verbose, buf, max_cols, memory_usage, ...]) Concise summary of a DataFrame. insert(loc, column, value[, allow_duplicates]) Insert column into DataFrame at specified location. interpolate([method, axis, limit, inplace, ...]) Interpolate values according to different methods. inverse_transform(estimator, *args, **kwargs) Call estimator’s inverse_transform method. irow(i[, copy]) isin(values) Return boolean DataFrame showing whether each element in the DataFrame is contained in values. isnull() Return a boolean same-sized object indicating if the values are null iteritems() Iterator over (column, series) pairs iterkv(*args, **kwargs) iteritems alias used to get around 2to3. Deprecated iterrows() Iterate over rows of DataFrame as (index, Series) pairs. itertuples([index]) Iterate over rows of DataFrame as tuples, with index value join(other[, on, how, lsuffix, rsuffix, sort]) Join columns with other DataFrame either on index or on a key column. keys() Get the ‘info axis’ (see Indexing for more) kurt([axis, skipna, level, numeric_only]) Return unbiased kurtosis over requested axis kurtosis([axis, skipna, level, numeric_only]) Return unbiased kurtosis over requested axis last(offset) Convenience method for subsetting final periods of time series data last_valid_index() Return label for last non-NA/null value le(other[, axis, level]) Wrapper for flexible comparison methods le load(path) Deprecated. lookup(row_labels, col_labels) Label-based “fancy indexing” function for DataFrame. lt(other[, axis, level]) Wrapper for flexible comparison methods lt mad([axis, skipna, level]) Return the mean absolute deviation of the values for the requested axis mask(cond) Returns copy whose values are replaced with nan if the max([axis, skipna, level, numeric_only]) This method returns the maximum of the values in the object. mean([axis, skipna, level, numeric_only]) Return the mean of the values for the requested axis median([axis, skipna, level, numeric_only]) Return the median of the values for the requested axis memory_usage([index]) Memory usage of DataFrame columns. merge(right[, how, on, left_on, right_on, ...]) Merge DataFrame objects by performing a database-style join operation by columns or indexes. min([axis, skipna, level, numeric_only]) This method returns the minimum of the values in the object. mod(other[, axis, level, fill_value]) Binary operator mod with support to substitute a fill_value for missing data in mode([axis, numeric_only]) Gets the mode of each element along the axis selected. mul(other[, axis, level, fill_value]) Binary operator mul with support to substitute a fill_value for missing data in multiply(other[, axis, level, fill_value]) Binary operator mul with support to substitute a fill_value for missing data in ne(other[, axis, level]) Wrapper for flexible comparison methods ne notnull() Return a boolean same-sized object indicating if the values are pct_change([periods, fill_method, limit, freq]) Percent change over given number of periods. pivot([index, columns, values]) Reshape data (produce a “pivot” table) based on column values. pivot_table(*args, **kwargs) Create a spreadsheet-style pivot table as a DataFrame. plot(data[, x, y, kind, ax, subplots, ...]) Make plots of DataFrame using matplotlib / pylab. pop(item) Return item and drop from frame. pow(other[, axis, level, fill_value]) Binary operator pow with support to substitute a fill_value for missing data in predict(estimator, *args, **kwargs) Call estimator’s predict method. predict_log_proba(estimator, *args, **kwargs) Call estimator’s predict_log_proba method. predict_proba(estimator, *args, **kwargs) Call estimator’s predict_proba method. prod([axis, skipna, level, numeric_only]) Return the product of the values for the requested axis product([axis, skipna, level, numeric_only]) Return the product of the values for the requested axis quantile([q, axis, numeric_only]) Return values at the given quantile over requested axis, a la numpy.percentile. query(expr, **kwargs) Query the columns of a frame with a boolean expression. radd(other[, axis, level, fill_value]) Binary operator radd with support to substitute a fill_value for missing data in rank([axis, numeric_only, method, ...]) Compute numerical data ranks (1 through n) along axis. rdiv(other[, axis, level, fill_value]) Binary operator rtruediv with support to substitute a fill_value for missing data in reindex([index, columns]) Conform DataFrame to new index with optional filling logic, placing NA/NaN in locations having no value in the previous index. reindex_axis(labels[, axis, method, level, ...]) Conform input object to new index with optional filling logic, placing NA/NaN in locations having no value in the previous index. reindex_like(other[, method, copy, limit]) return an object with matching indicies to myself rename([index, columns]) Alter axes input function or functions. rename_axis(mapper[, axis, copy, inplace]) Alter index and / or columns using input function or functions. reorder_levels(order[, axis]) Rearrange index levels using input order. replace([to_replace, value, inplace, limit, ...]) Replace values given in ‘to_replace’ with ‘value’. resample(rule[, how, axis, fill_method, ...]) Convenience method for frequency conversion and resampling of regular time-series data. reset_index([level, drop, inplace, ...]) For DataFrame with multi-level index, return new DataFrame with labeling information in the columns under the index names, defaulting to ‘level_0’, ‘level_1’, etc. rfloordiv(other[, axis, level, fill_value]) Binary operator rfloordiv with support to substitute a fill_value for missing data in rmod(other[, axis, level, fill_value]) Binary operator rmod with support to substitute a fill_value for missing data in rmul(other[, axis, level, fill_value]) Binary operator rmul with support to substitute a fill_value for missing data in rpow(other[, axis, level, fill_value]) Binary operator rpow with support to substitute a fill_value for missing data in rsub(other[, axis, level, fill_value]) Binary operator rsub with support to substitute a fill_value for missing data in rtruediv(other[, axis, level, fill_value]) Binary operator rtruediv with support to substitute a fill_value for missing data in save(path) Deprecated. score(estimator, *args, **kwargs) Call estimator’s score method. select(crit[, axis]) Return data corresponding to axis labels matching criteria select_dtypes([include, exclude]) Return a subset of a DataFrame including/excluding columns based on their dtype. sem([axis, skipna, level, ddof]) Return unbiased standard error of the mean over requested axis. set_axis(axis, labels) public verson of axis assignment set_index(keys[, drop, append, inplace, ...]) Set the DataFrame index (row labels) using one or more existing columns. set_value(index, col, value[, takeable]) Put single value at passed column and index shift([periods, freq, axis]) Shift index by desired number of periods with an optional time freq skew([axis, skipna, level, numeric_only]) Return unbiased skew over requested axis slice_shift([periods, axis]) Equivalent to shift without copying data. sort([columns, axis, ascending, inplace, ...]) Sort DataFrame either by labels (along either axis) or by the values in sort_index([axis, by, ascending, inplace, ...]) Sort DataFrame either by labels (along either axis) or by the values in sortlevel([level, axis, ascending, inplace, ...]) Sort multilevel index by chosen axis and primary level. squeeze() squeeze length 1 dimensions stack([level, dropna]) Pivot a level of the (possibly hierarchical) column labels, returning a DataFrame (or Series in the case of an object with a single level of column labels) having a hierarchical index with a new inner-most level of row labels. std([axis, skipna, level, ddof]) Return unbiased standard deviation over requested axis. sub(other[, axis, level, fill_value]) Binary operator sub with support to substitute a fill_value for missing data in subtract(other[, axis, level, fill_value]) Binary operator sub with support to substitute a fill_value for missing data in sum([axis, skipna, level, numeric_only]) Return the sum of the values for the requested axis swapaxes(axis1, axis2[, copy]) Interchange axes and swap values axes appropriately swaplevel(i, j[, axis]) Swap levels i and j in a MultiIndex on a particular axis tail([n]) Returns last n rows take(indices[, axis, convert, is_copy]) Analogous to ndarray.take to_clipboard([excel, sep]) Attempt to write text representation of object to the system clipboard This can be pasted into Excel, for example. to_csv(*args, **kwargs) Write DataFrame to a comma-separated values (csv) file to_dense() Return dense representation of NDFrame (as opposed to sparse) to_dict(*args, **kwargs) Convert DataFrame to dictionary. to_excel(*args, **kwargs) Write DataFrame to a excel sheet to_gbq(destination_table[, project_id, ...]) Write a DataFrame to a Google BigQuery table. to_hdf(path_or_buf, key, **kwargs) activate the HDFStore to_html([buf, columns, col_space, colSpace, ...]) Render a DataFrame as an HTML table. to_json([path_or_buf, orient, date_format, ...]) Convert the object to a JSON string. to_latex([buf, columns, col_space, ...]) Render a DataFrame to a tabular environment table. to_msgpack([path_or_buf]) msgpack (serialize) object to input file path to_panel() Transform long (stacked) format (DataFrame) into wide (3D, Panel) format. to_period([freq, axis, copy]) Convert DataFrame from DatetimeIndex to PeriodIndex with desired to_pickle(path) Pickle (serialize) object to input file path to_records([index, convert_datetime64]) Convert DataFrame to record array. to_sparse([fill_value, kind]) Convert to SparseDataFrame to_sql(name, con[, flavor, schema, ...]) Write records stored in a DataFrame to a SQL database. to_stata(fname[, convert_dates, ...]) A class for writing Stata binary dta files from array-like objects to_string([buf, columns, col_space, ...]) Render a DataFrame to a console-friendly tabular output. to_timestamp([freq, how, axis, copy]) Cast to DatetimeIndex of timestamps, at beginning of period to_wide(*args, **kwargs) transform(estimator, *args, **kwargs) Call estimator’s transform method. transpose() Transpose index and columns truediv(other[, axis, level, fill_value]) Binary operator truediv with support to substitute a fill_value for missing data in truncate([before, after, axis, copy]) Truncates a sorted NDFrame before and/or after some particular dates. tshift([periods, freq, axis]) Shift the time index, using the index’s frequency if available tz_convert(tz[, axis, level, copy]) Convert the axis to target time zone. tz_localize(*args, **kwargs) Localize tz-naive TimeSeries to target time zone unstack([level]) Pivot a level of the (necessarily hierarchical) index labels, returning a DataFrame having a new level of column labels whose inner-most level consists of the pivoted index labels. update(other[, join, overwrite, ...]) Modify DataFrame in place using non-NA values from passed DataFrame. var([axis, skipna, level, ddof]) Return unbiased variance over requested axis. where(cond[, other, inplace, axis, level, ...]) Return an object of same shape as self and whose corresponding entries are from self where cond is True and otherwise are from other. xs(key[, axis, level, copy, drop_level]) Returns a cross-section (row(s) or column(s)) from the Series/DataFrame. - cluster¶
Property to access sklearn.cluster. See expandas.skaccessors.cluster
- covariance¶
Property to access sklearn.covariance. See expandas.skaccessors.covariance
- cross_decomposition¶
Property to access sklearn.cross_decomposition
- cross_validation¶
Property to access sklearn.cross_validation. See expandas.skaccessors.cross_validation
- crv¶
Property to access sklearn.cross_validation. See expandas.skaccessors.cross_validation
- data¶
Return data (explanatory variable / features)
Returns: data : ModelFrame
- decision¶
Return current estimator’s decision function
Returns: decisions : ModelFrame
- decision_function(estimator, *args, **kwargs)¶
Call estimator’s decision_function method.
Parameters: args : arguments passed to decision_function method
kwargs : keyword arguments passed to decision_function method
Returns: returned : decisions
- decomposition¶
Property to access sklearn.decomposition
- dummy¶
Property to access sklearn.dummy
- ensemble¶
Property to access sklearn.ensemble. See expandas.skaccessors.ensemble
- estimator¶
Return most recently used estimator
Returns: estimator : estimator
- feature_extraction¶
Property to access sklearn.feature_extraction. See expandas.skaccessors.feature_extraction
- feature_selection¶
Property to access sklearn.feature_selection. See expandas.skaccessors.feature_selection
- fit(estimator, *args, **kwargs)¶
Call estimator’s fit method.
Parameters: args : arguments passed to fit method
kwargs : keyword arguments passed to fit method
Returns: returned : None or fitted estimator
- fit_predict(estimator, *args, **kwargs)¶
Call estimator’s fit_predict method.
Parameters: args : arguments passed to fit_predict method
kwargs : keyword arguments passed to fit_predict method
Returns: returned : predicted result
- fit_transform(estimator, *args, **kwargs)¶
Call estimator’s fit_transform method.
Parameters: args : arguments passed to fit_transform method
kwargs : keyword arguments passed to fit_transform method
Returns: returned : transformed result
- gaussian_process¶
Property to access sklearn.gaussian_process. See expandas.skaccessors.gaussian_process
- grid_search¶
Property to access sklearn.grid_search. See expandas.skaccessors.grid_search
- has_data()¶
Return whether ModelFrame has data
Returns: has_data : bool
- has_target()¶
Return whether ModelFrame has target
Returns: has_target : bool
- inverse_transform(estimator, *args, **kwargs)¶
Call estimator’s inverse_transform method.
Parameters: args : arguments passed to inverse_transform method
kwargs : keyword arguments passed to inverse_transform method
Returns: returned : transformed result
- isotonic¶
Property to access sklearn.isotonic. See expandas.skaccessors.isotonic
- kernel_approximation¶
Property to access sklearn.kernel_approximation
- lda¶
Property to access sklearn.lda
- learning_curve¶
Property to access sklearn.learning_curve. See expandas.skaccessors.learning_curve
- linear_model¶
Property to access sklearn.linear_model. See expandas.skaccessors.linear_model
- lm¶
Property to access sklearn.linear_model. See expandas.skaccessors.linear_model
- log_proba¶
Return current estimator’s log probabilities
Returns: probabilities : ModelFrame
- manifold¶
Property to access sklearn.manifold. See expandas.skaccessors.manifold
- metrics¶
Property to access sklearn.metrics. See expandas.skaccessors.metrics
- mixture¶
Property to access sklearn.mixture
- multiclass¶
Property to access sklearn.multiclass. See expandas.skaccessors.multiclass
- naive_bayes¶
Property to access sklearn.naive_bayes
- neighbors¶
Property to access sklearn.neighbors. See expandas.skaccessors.neighbors
- neural_network¶
Property to access sklearn.neural_network
- pipeline¶
Property to access sklearn.pipeline. See expandas.skaccessors.pipeline
- pp¶
Property to access sklearn.preprocessing. See expandas.skaccessors.preprocessing
- predict(estimator, *args, **kwargs)¶
Call estimator’s predict method.
Parameters: args : arguments passed to predict method
kwargs : keyword arguments passed to predict method
Returns: returned : predicted result
- predict_log_proba(estimator, *args, **kwargs)¶
Call estimator’s predict_log_proba method.
Parameters: args : arguments passed to predict_log_proba method
kwargs : keyword arguments passed to predict_log_proba method
Returns: returned : probabilities
- predict_proba(estimator, *args, **kwargs)¶
Call estimator’s predict_proba method.
Parameters: args : arguments passed to predict_proba method
kwargs : keyword arguments passed to predict_proba method
Returns: returned : probabilities
- predicted¶
Return current estimator’s predicted results
Returns: predicted : ModelSeries
- preprocessing¶
Property to access sklearn.preprocessing. See expandas.skaccessors.preprocessing
- proba¶
Return current estimator’s probabilities
Returns: probabilities : ModelFrame
- qda¶
Property to access sklearn.qda
- random_projection¶
Property to access sklearn.random_projection. See expandas.skaccessors.random_projection
- score(estimator, *args, **kwargs)¶
Call estimator’s score method.
Parameters: args : arguments passed to score method
kwargs : keyword arguments passed to score method
Returns: returned : score
- semi_supervised¶
Property to access sklearn.semi_supervised. See expandas.skaccessors.semi_supervised
- svm¶
Property to access sklearn.svm. See expandas.skaccessors.svm
- target¶
Return target (response variable)
Returns: target : ModelSeries
- target_name¶
Return target column name
Returns: target : object
- transform(estimator, *args, **kwargs)¶
Call estimator’s transform method.
Parameters: args : arguments passed to transform method
kwargs : keyword arguments passed to transform method
Returns: returned : transformed result
- tree¶
Property to access sklearn.tree
- class expandas.core.series.ModelSeries(data=None, index=None, dtype=None, name=None, copy=False, fastpath=False)¶
Bases: pandas.core.series.Series
Wrapper for pandas.Series to support sklearn.preprocessing
Attributes
T return the transpose, which is by definition self at axes base return the base object if the memory of the underlying data is shared blocks Internal property, property synonym for as_blocks() data return the data pointer of the underlying data dtype return the dtype object of the underlying data dtypes return the dtype object of the underlying data empty True if NDFrame is entirely empty [no items] flags return the ndarray.flags for the underlying data ftype return if the data is sparse|dense ftypes return if the data is sparse|dense iat iloc imag is_time_series itemsize return the size of the dtype of the item of the underlying data ix loc nbytes return the number of bytes in the underlying data ndim return the number of dimensions of the underlying data, by definition 1 pp Property to access sklearn.preprocessing. preprocessing Property to access sklearn.preprocessing. real shape return a tuple of the shape of the underlying data size return the number of elements in the underlying data strides return the strides of the underlying data values Return Series as ndarray cat dt is_copy str Methods
abs() Return an object with absolute value taken. add(other[, level, fill_value, axis]) Binary operator add with support to substitute a fill_value for missing data add_prefix(prefix) Concatenate prefix string with panel items names. add_suffix(suffix) Concatenate suffix string with panel items names align(other[, join, axis, level, copy, ...]) Align two object on their axes with the all([axis, bool_only, skipna, level]) Return whether all elements are True over requested axis any([axis, bool_only, skipna, level]) Return whether any element is True over requested axis append(to_append[, verify_integrity]) Concatenate two or more Series. apply(func[, convert_dtype, args]) Invoke function on values of Series. argmax([axis, out, skipna]) Index of first occurrence of maximum of values. argmin([axis, out, skipna]) Index of first occurrence of minimum of values. argsort([axis, kind, order]) Overrides ndarray.argsort. as_blocks() Convert the frame to a dict of dtype -> Constructor Types that each has a homogeneous dtype. as_matrix([columns]) Convert the frame to its Numpy-array representation. asfreq(freq[, method, how, normalize]) Convert all TimeSeries inside to specified frequency using DateOffset objects. asof(where) Return last good (non-NaN) value in TimeSeries if value is NaN for requested date. astype(dtype[, copy, raise_on_error]) Cast object to input numpy.dtype at_time(time[, asof]) Select values at particular time of day (e.g. autocorr() Lag-1 autocorrelation between(left, right[, inclusive]) Return boolean Series equivalent to left <= series <= right. between_time(start_time, end_time[, ...]) Select values between particular times of the day (e.g., 9:00-9:30 AM) bfill([axis, inplace, limit, downcast]) Synonym for NDFrame.fillna(method=’bfill’) bool() Return the bool of a single element PandasObject clip([lower, upper, out]) Trim values at input threshold(s) clip_lower(threshold) Return copy of the input with values below given value truncated clip_upper(threshold) Return copy of input with values above given value truncated combine(other, func[, fill_value]) Perform elementwise binary operation on two Series using given function combine_first(other) Combine Series values, choosing the calling Series’s values first. compound([axis, skipna, level]) Return the compound percentage of the values for the requested axis compress(condition[, axis, out]) Return selected slices of an array along given axis as a Series consolidate([inplace]) Compute NDFrame with “consolidated” internals (data of each dtype grouped together in a single ndarray). convert_objects([convert_dates, ...]) Attempt to infer better dtype for object columns copy([deep]) Make a copy of this object corr(other[, method, min_periods]) Compute correlation with other Series, excluding missing values count([level]) Return number of non-NA/null observations in the Series cov(other[, min_periods]) Compute covariance with Series, excluding missing values cummax([axis, dtype, out, skipna]) Return cumulative max over requested axis. cummin([axis, dtype, out, skipna]) Return cumulative min over requested axis. cumprod([axis, dtype, out, skipna]) Return cumulative prod over requested axis. cumsum([axis, dtype, out, skipna]) Return cumulative sum over requested axis. describe([percentile_width, percentiles, ...]) Generate various summary statistics, excluding NaN values. diff([periods]) 1st discrete difference of object div(other[, level, fill_value, axis]) Binary operator truediv with support to substitute a fill_value for missing data divide(other[, level, fill_value, axis]) Binary operator truediv with support to substitute a fill_value for missing data dot(other) Matrix multiplication with DataFrame or inner-product with Series drop(labels[, axis, level, inplace]) Return new object with labels in requested axis removed drop_duplicates([take_last, inplace]) Return Series with duplicate values removed dropna([axis, inplace]) Return Series without null values duplicated([take_last]) Return boolean Series denoting duplicate values eq(other) equals(other) Determines if two NDFrame objects contain the same elements. factorize([sort, na_sentinel]) Encode the object as an enumerated type or categorical variable ffill([axis, inplace, limit, downcast]) Synonym for NDFrame.fillna(method=’ffill’) fillna([value, method, axis, inplace, ...]) Fill NA/NaN values using the specified method filter([items, like, regex, axis]) Restrict the info axis to set of items or wildcard first(offset) Convenience method for subsetting initial periods of time series data first_valid_index() Return label for first non-NA/null value floordiv(other[, level, fill_value, axis]) Binary operator floordiv with support to substitute a fill_value for missing data from_array(arr[, index, name, dtype, copy, ...]) from_csv(path[, sep, parse_dates, header, ...]) Read delimited file into Series ge(other) get(key[, default]) Get item from object for given key (DataFrame column, Panel slice, etc.). get_dtype_counts() Return the counts of dtypes in this object get_ftype_counts() Return the counts of ftypes in this object get_value(label[, takeable]) Quickly retrieve single value at passed index label get_values() same as values (but handles sparseness conversions); is a view groupby([by, axis, level, as_index, sort, ...]) Group series using mapper (dict or key function, apply given function gt(other) hasnans() return if I have any nans; enables various perf speedups head([n]) Returns first n rows hist([by, ax, grid, xlabelsize, xrot, ...]) Draw histogram of the input series using matplotlib idxmax([axis, out, skipna]) Index of first occurrence of maximum of values. idxmin([axis, out, skipna]) Index of first occurrence of minimum of values. iget(i[, axis]) Return the i-th value or values in the Series by location iget_value(i[, axis]) Return the i-th value or values in the Series by location interpolate([method, axis, limit, inplace, ...]) Interpolate values according to different methods. irow(i[, axis]) Return the i-th value or values in the Series by location isin(values) Return a boolean Series showing whether each element in the Series is exactly contained in the passed sequence of values. isnull() Return a boolean same-sized object indicating if the values are null item() return the first element of the underlying data as a python scalar iteritems() Lazily iterate over (index, value) tuples iterkv(*args, **kwargs) iteritems alias used to get around 2to3. Deprecated keys() Alias for index kurt([axis, skipna, level, numeric_only]) Return unbiased kurtosis over requested axis kurtosis([axis, skipna, level, numeric_only]) Return unbiased kurtosis over requested axis last(offset) Convenience method for subsetting final periods of time series data last_valid_index() Return label for last non-NA/null value le(other) load(path) Deprecated. lt(other) mad([axis, skipna, level]) Return the mean absolute deviation of the values for the requested axis map(arg[, na_action]) Map values of Series using input correspondence (which can be mask(cond) Returns copy whose values are replaced with nan if the max([axis, skipna, level, numeric_only]) This method returns the maximum of the values in the object. mean([axis, skipna, level, numeric_only]) Return the mean of the values for the requested axis median([axis, skipna, level, numeric_only]) Return the median of the values for the requested axis min([axis, skipna, level, numeric_only]) This method returns the minimum of the values in the object. mod(other[, level, fill_value, axis]) Binary operator mod with support to substitute a fill_value for missing data mode() Returns the mode(s) of the dataset. mul(other[, level, fill_value, axis]) Binary operator mul with support to substitute a fill_value for missing data multiply(other[, level, fill_value, axis]) Binary operator mul with support to substitute a fill_value for missing data ne(other) nlargest([n, take_last]) Return the largest n elements. nonzero() Return the indices of the elements that are non-zero notnull() Return a boolean same-sized object indicating if the values are nsmallest([n, take_last]) Return the smallest n elements. nunique([dropna]) Return number of unique elements in the object. order([na_last, ascending, kind, ...]) Sorts Series object, by value, maintaining index-value link. pct_change([periods, fill_method, limit, freq]) Percent change over given number of periods. plot(data[, kind, ax, figsize, use_index, ...]) Make plots of Series using matplotlib / pylab. pop(item) Return item and drop from frame. pow(other[, level, fill_value, axis]) Binary operator pow with support to substitute a fill_value for missing data prod([axis, skipna, level, numeric_only]) Return the product of the values for the requested axis product([axis, skipna, level, numeric_only]) Return the product of the values for the requested axis ptp([axis, out]) put(*args, **kwargs) return a ndarray with the values put quantile([q]) Return value at the given quantile, a la numpy.percentile. radd(other[, level, fill_value, axis]) Binary operator radd with support to substitute a fill_value for missing data rank([method, na_option, ascending, pct]) Compute data ranks (1 through n). ravel([order]) Return the flattened underlying data as an ndarray rdiv(other[, level, fill_value, axis]) Binary operator rtruediv with support to substitute a fill_value for missing data reindex([index]) Conform Series to new index with optional filling logic, placing NA/NaN in locations having no value in the previous index. reindex_axis(labels[, axis]) for compatibility with higher dims reindex_like(other[, method, copy, limit]) return an object with matching indicies to myself rename([index]) Alter axes input function or functions. rename_axis(mapper[, axis, copy, inplace]) Alter index and / or columns using input function or functions. reorder_levels(order) Rearrange index levels using input order. repeat(reps) return a new Series with the values repeated reps times replace([to_replace, value, inplace, limit, ...]) Replace values given in ‘to_replace’ with ‘value’. resample(rule[, how, axis, fill_method, ...]) Convenience method for frequency conversion and resampling of regular time-series data. reset_index([level, drop, name, inplace]) Analogous to the pandas.DataFrame.reset_index() function, see docstring there. reshape(*args, **kwargs) return an ndarray with the values shape rfloordiv(other[, level, fill_value, axis]) Binary operator rfloordiv with support to substitute a fill_value for missing data rmod(other[, level, fill_value, axis]) Binary operator rmod with support to substitute a fill_value for missing data rmul(other[, level, fill_value, axis]) Binary operator rmul with support to substitute a fill_value for missing data round([decimals, out]) Return a with each element rounded to the given number of decimals. rpow(other[, level, fill_value, axis]) Binary operator rpow with support to substitute a fill_value for missing data rsub(other[, level, fill_value, axis]) Binary operator rsub with support to substitute a fill_value for missing data rtruediv(other[, level, fill_value, axis]) Binary operator rtruediv with support to substitute a fill_value for missing data save(path) Deprecated. searchsorted(v[, side, sorter]) Find indices where elements should be inserted to maintain order. select(crit[, axis]) Return data corresponding to axis labels matching criteria sem([axis, skipna, level, ddof]) Return unbiased standard error of the mean over requested axis. set_axis(axis, labels) public verson of axis assignment set_value(label, value[, takeable]) Quickly set single value at passed label. shift([periods, freq, axis]) Shift index by desired number of periods with an optional time freq skew([axis, skipna, level, numeric_only]) Return unbiased skew over requested axis slice_shift([periods, axis]) Equivalent to shift without copying data. sort([axis, ascending, kind, na_position, ...]) Sort values and index labels by value. sort_index([ascending]) Sort object by labels (along an axis) sortlevel([level, ascending, sort_remaining]) Sort Series with MultiIndex by chosen level. squeeze() squeeze length 1 dimensions std([axis, skipna, level, ddof]) Return unbiased standard deviation over requested axis. sub(other[, level, fill_value, axis]) Binary operator sub with support to substitute a fill_value for missing data subtract(other[, level, fill_value, axis]) Binary operator sub with support to substitute a fill_value for missing data sum([axis, skipna, level, numeric_only]) Return the sum of the values for the requested axis swapaxes(axis1, axis2[, copy]) Interchange axes and swap values axes appropriately swaplevel(i, j[, copy]) Swap levels i and j in a MultiIndex tail([n]) Returns last n rows take(indices[, axis, convert, is_copy]) return Series corresponding to requested indices to_clipboard([excel, sep]) Attempt to write text representation of object to the system clipboard This can be pasted into Excel, for example. to_csv(path[, index, sep, na_rep, ...]) Write Series to a comma-separated values (csv) file to_dense() Return dense representation of NDFrame (as opposed to sparse) to_dict() Convert Series to {label -> value} dict to_frame([name]) Convert Series to DataFrame to_hdf(path_or_buf, key, **kwargs) activate the HDFStore to_json([path_or_buf, orient, date_format, ...]) Convert the object to a JSON string. to_msgpack([path_or_buf]) msgpack (serialize) object to input file path to_period([freq, copy]) Convert TimeSeries from DatetimeIndex to PeriodIndex with desired to_pickle(path) Pickle (serialize) object to input file path to_sparse([kind, fill_value]) Convert Series to SparseSeries to_sql(name, con[, flavor, schema, ...]) Write records stored in a DataFrame to a SQL database. to_string([buf, na_rep, float_format, ...]) Render a string representation of the Series to_timestamp([freq, how, copy]) Cast to datetimeindex of timestamps, at beginning of period tolist() Convert Series to a nested list transpose() return the transpose, which is by definition self truediv(other[, level, fill_value, axis]) Binary operator truediv with support to substitute a fill_value for missing data truncate([before, after, axis, copy]) Truncates a sorted NDFrame before and/or after some particular dates. tshift([periods, freq, axis]) Shift the time index, using the index’s frequency if available tz_convert(tz[, axis, level, copy]) Convert the axis to target time zone. tz_localize(*args, **kwargs) Localize tz-naive TimeSeries to target time zone unique() Return array of unique values in the object. unstack([level]) Unstack, a.k.a. update(other) Modify Series in place using non-NA values from passed Series. valid([inplace]) value_counts([normalize, sort, ascending, ...]) Returns object containing counts of unique values. var([axis, skipna, level, ddof]) Return unbiased variance over requested axis. view([dtype]) where(cond[, other, inplace, axis, level, ...]) Return an object of same shape as self and whose corresponding entries are from self where cond is True and otherwise are from other. xs(key[, axis, level, copy, drop_level]) Returns a cross-section (row(s) or column(s)) from the Series/DataFrame. - pp¶
Property to access sklearn.preprocessing. See expandas.skaccessors.preprocessing
- preprocessing¶
Property to access sklearn.preprocessing. See expandas.skaccessors.preprocessing
- to_frame(name=None)¶
Convert Series to DataFrame
Parameters: name : object, default None
The passed name should substitute for the series name (if it has one).
Returns: data_frame : DataFrame