Style

New in version 0.17.1 Provisional: This is a new feature and still under development. We'll be adding features and possibly making breaking changes in future releases. We'd love to hear your feedback. This document is written as a Jupyter Notebook, and can be viewed or downloaded here. You can apply conditional formatting, the visual styling of a DataFrame depending on the data within, by using the DataFrame.style property. This is a property that returns a pandas.Styler object, which ha

StataWriter.write_file()

StataWriter.write_file() [source]

StataReader.variable_labels()

StataReader.variable_labels() [source] Returns variable labels as a dict, associating each variable name with corresponding label

StataReader.value_labels()

StataReader.value_labels() [source] Returns a dict, associating each variable name a dict, associating each value its corresponding label

StataReader.data_label()

StataReader.data_label() [source] Returns data label of Stata file

StataReader.data()

StataReader.data(**kwargs) [source] DEPRECATED: Reads observations from Stata file, converting them into a dataframe This is a legacy method. Use read in new code. Parameters: convert_dates : boolean, defaults to True Convert date variables to DataFrame time values convert_categoricals : boolean, defaults to True Read value labels and convert columns to Categorical/Factor variables index : identifier of index column identifier of column that should be used as index of the DataFrame c

SparseSeries.to_coo()

SparseSeries.to_coo(row_levels=(0, ), column_levels=(1, ), sort_labels=False) [source] Create a scipy.sparse.coo_matrix from a SparseSeries with MultiIndex. Use row_levels and column_levels to determine the row and column coordinates respectively. row_levels and column_levels are the names (labels) or numbers of the levels. {row_levels, column_levels} must be a partition of the MultiIndex level names (or numbers). New in version 0.16.0. Parameters: row_levels : tuple/list column_levels :

SparseSeries.from_coo()

classmethod SparseSeries.from_coo(A, dense_index=False) [source] Create a SparseSeries from a scipy.sparse.coo_matrix. New in version 0.16.0. Parameters: A : scipy.sparse.coo_matrix dense_index : bool, default False If False (default), the SparseSeries index consists of only the coords of the non-null entries of the original coo_matrix. If True, the SparseSeries index consists of the full sorted (row, col) coordinates of the coo_matrix. Returns: s : SparseSeries Examples >>>

Sparse data structures

Note The SparsePanel class has been removed in 0.19.0 We have implemented ?sparse? versions of Series and DataFrame. These are not sparse in the typical ?mostly 0?. Rather, you can view these objects as being ?compressed? where any data matching a specific value (NaN / missing value, though any value can be chosen) is omitted. A special SparseIndex object tracks where data has been ?sparsified?. This will make much more sense in an example. All of the standard pandas data structures have a t

SeriesGroupBy.value_counts()

SeriesGroupBy.value_counts(normalize=False, sort=True, ascending=False, bins=None, dropna=True) [source]