Skip to content

Commit

Permalink
Removed Variable dtype (#416)
Browse files Browse the repository at this point in the history
* removed dtype

* use repr

* fix test

* delete varaible dtype
  • Loading branch information
gsheni committed Feb 8, 2019
1 parent 5923b68 commit 2204a76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion featuretools/entityset/entity.py
Expand Up @@ -84,7 +84,7 @@ def __repr__(self):
repr_out = u"Entity: {}\n".format(self.id)
repr_out += u" Variables:"
for v in self.variables:
repr_out += u"\n {} (dtype: {})".format(v.id, v.dtype)
repr_out += u"\n {} (dtype: {})".format(v.id, v._dtype_repr)

shape = self.shape
repr_out += u"\n Shape:\n (Rows: {}, Columns: {})".format(
Expand Down
9 changes: 2 additions & 7 deletions featuretools/variable_types/variable.py
Expand Up @@ -44,7 +44,7 @@ def __eq__(self, other):
self.entity_id == other.entity_id

def __repr__(self):
ret = u"<Variable: {} (dtype = {})>".format(self.name, self.dtype)
ret = u"<Variable: {} (dtype = {})>".format(self.name, self._dtype_repr)

# encode for python 2
if type(ret) != str:
Expand All @@ -70,11 +70,6 @@ def create_from(cls, variable):
def name(self):
return self._name if self._name is not None else self.id

@property
def dtype(self):
return self._dtype_repr \
if self._dtype_repr is not None else "generic_type"

@name.setter
def name(self, name):
self._name = name
Expand Down Expand Up @@ -181,7 +176,7 @@ def __init__(self, id, entity, format=None, name=None):
super(Datetime, self).__init__(id, entity, name)

def __repr__(self):
ret = u"<Variable: {} (dtype: {}, format: {})>".format(self.name, self.dtype, self.format)
ret = u"<Variable: {} (dtype: {}, format: {})>".format(self.name, self._dtype_repr, self.format)

# encode for python 2
if type(ret) != str:
Expand Down

0 comments on commit 2204a76

Please sign in to comment.