Skip to content

Commit 8c0c6b8

Browse files
authored
Removed the dead code in _join() (#630)
* Add unit tests for join method coverage * Removed proposed test cases and the dead code in _join()
1 parent 991bc76 commit 8c0c6b8

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

datascience/tables.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2036,11 +2036,6 @@ def join(self, column_label, other, other_label=None):
20362036

20372037
def _join(self, column_label, other, other_label=[]):
20382038
"""joins when COLUMN_LABEL is a string"""
2039-
if self.num_rows == 0 or other.num_rows == 0:
2040-
return None
2041-
if not other_label:
2042-
other_label = column_label
2043-
20442039
self_rows = self.index_by(column_label)
20452040
other_rows = other.index_by(other_label)
20462041
return self._join_helper([column_label], self_rows, other, [other_label], other_rows)

tests/test_tables.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,8 +1659,8 @@ def test_join_without_other_label(table, table2):
16591659
2 | b | 3 | two
16601660
2 | c | 3 | two
16611661
""")
1662-
1663-
1662+
1663+
16641664
##################
16651665
# Export/Display #
16661666
##################

0 commit comments

Comments
 (0)