Skip to content

Commit

Permalink
use keep='first', keep='last' in duplicated()
Browse files Browse the repository at this point in the history
updated pandas version requirement to match
  • Loading branch information
Jeremy McRae committed Aug 10, 2017
1 parent 01c394c commit 288f753
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scripts/get_validations.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ def remove_duplicates(data):
"""

columns = ["person_id", "chrom", "start_pos"]
first = data.duplicated(take_last=False, subset=columns)
second = data.duplicated(take_last=True, subset=columns)
first = data.duplicated(keep='first', subset=columns)
second = data.duplicated(keep='last', subset=columns)
dups = data[first | second]
without_dups = data[~(first | second)]

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
description = ("Filtering candidate de novo variants."),
license = "MIT",
packages=["denovoFilter"],
install_requires=['pandas >= 0.13.1',
install_requires=['pandas >= 0.17.0',
'numpy >= 1.6.1',
'scipy >= 0.9.0',
'intervaltree >= 2.0',
Expand Down

0 comments on commit 288f753

Please sign in to comment.