pandas_util Module

Utility functions for working with pandas datatypes, i.e. DataFrames and Series.

@author: drusk

pml.utils.pandas_util.are_dataframes_equal(dataframe1, dataframe2)[source]

Compares two pandas DataFrame objects to see if they are equal.

Args:
dataframe1: pandas.DataFrame dataframe2: pandas.DataFrame
Returns:
True if the DataFrames are identically-labeled and all elements are the same. False otherwise.
pml.utils.pandas_util.get_indices_with_value(series, value)[source]

Retrieves the indices of a pandas Series which have the specified value.

Args:
series: pandas.Series
The series to search and retrieve indices from.
value:
The value to search for.
Returns:
indices: pandas.Index
The indices which held the specified value.

Project Versions

Previous topic

naive_bayes Module

Next topic

pca Module

This Page