Skip to content

Commit

Permalink
Names check in mergeDT
Browse files Browse the repository at this point in the history
  • Loading branch information
jpn-- committed Feb 9, 2017
1 parent a5c036e commit 03216f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py/dt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2729,7 +2729,7 @@ def merge_into_idco_from_dataframe(self, other, self_on, other_on, dupe_suffix="
anything_imported = True
if original_source is not None:
self.idco[col]._v_attrs.ORIGINAL_SOURCE = original_source
elif names[col] not in self.idco:
elif names is not None and col in names and names[col] not in self.idco:
log('importing "{}" as "{}" into {}'.format(col, names[col], self.source_filename))
self.new_idco_from_array(names[col], arr=new_df[col].values)
anything_imported = True
Expand Down Expand Up @@ -2819,7 +2819,7 @@ def merge_into_idco(self, other, self_on, other_on=None, dupe_suffix="_copy", or
anything_imported = True
if original_source is not None:
self.idco[col]._v_attrs.ORIGINAL_SOURCE = original_source
elif names[col] not in self.idco:
elif names is not None and col in names and names[col] not in self.idco:
log('importing "{}" as "{}" into {}'.format(col, names[col], self.source_filename))
self.new_idco_from_array(names[col], arr=new_df[col].values)
anything_imported = True
Expand Down

0 comments on commit 03216f1

Please sign in to comment.