Skip to content

Commit

Permalink
Merge pull request #11 from notauni/notauni-patch-for-pandas0.23.0
Browse files Browse the repository at this point in the history
pandas 0.23.0 change to types
  • Loading branch information
Mourad authored May 24, 2018
2 parents 3a64a58 + 2a05d97 commit b35beaa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pandas_summary/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import numpy as np
import pandas as pd
from pandas.core import common
from pandas.api import types


class DataFrameSummary(object):
Expand Down Expand Up @@ -109,10 +110,10 @@ def _get_columns_info(self, stats):
self.EXCLUDE,
column_info['constant'].union(column_info['bool']))
column_info[self.TYPE_NUMERIC] = pd.Index([c for c in rest_columns
if common.is_numeric_dtype(self.df[c])])
if types.is_numeric_dtype(self.df[c])])
rest_columns = self.get_columns(self.df[rest_columns], self.EXCLUDE, column_info['numeric'])
column_info[self.TYPE_DATE] = pd.Index([c for c in rest_columns
if common.is_datetime64_dtype(self.df[c])])
if types.is_datetime64_dtype(self.df[c])])
rest_columns = self.get_columns(self.df[rest_columns], self.EXCLUDE, column_info['date'])
unique_columns = stats['uniques'][rest_columns] == stats['counts'][rest_columns]
column_info[self.TYPE_UNIQUE] = stats['uniques'][rest_columns][unique_columns].index
Expand Down

0 comments on commit b35beaa

Please sign in to comment.