Skip to content

Commit

Permalink
Merge pull request #5 from peterk87/patch/fix-varname-variants
Browse files Browse the repository at this point in the history
Fix series var naming
  • Loading branch information
peterk87 authored Apr 19, 2021
2 parents 59c0894 + 9168df4 commit 58bbbf1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.2.3
current_version = 0.2.4
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@
test_suite='tests',
tests_require=test_requirements,
url='https://github.com/peterk87/xlavir',
version='0.2.3',
version='0.2.4',
zip_safe=False,
)
2 changes: 1 addition & 1 deletion xlavir/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

__author__ = """Peter Kruczkiewicz"""
__email__ = 'peter.kruczkiewicz@gmail.com'
__version__ = '0.2.3'
__version__ = '0.2.4'
8 changes: 4 additions & 4 deletions xlavir/tools/variants.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,11 @@ def simplify_snpsift(df: pd.DataFrame, sample_name: str) -> Optional[pd.DataFram
continue
else:
field_names.add(new_series_name)
series = df[c]
if series.dtype == 'object' and isinstance(series.values[0], str):
new_series = series.str.split(',', n=1, expand=True)[0]
dfc = df[c]
if dfc.dtype == 'object' and isinstance(dfc.values[0], str):
new_series = dfc.str.split(',', n=1, expand=True)[0]
else:
new_series = series.astype('str')
new_series = dfc.astype('str')
new_series.name = new_series_name
series.append(new_series)
else:
Expand Down

0 comments on commit 58bbbf1

Please sign in to comment.