Skip to content

Commit

Permalink
Merge pull request #13 from davidgardenier/12-fix-nan-conversion
Browse files Browse the repository at this point in the history
Fix NaN conversion and versioning on Github
  • Loading branch information
loostrum authored Dec 9, 2022
2 parents f041e7b + b913a44 commit 988a5c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion frbcat/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = 'github'
__version__ = 'github'
3 changes: 3 additions & 0 deletions frbcat/tns.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ def clean_df(self, df):
'related_files': 'num_files',
'channels_no': 'num_channels'}, inplace=True)

# Some columns that will be converted to int can contain NaN, replace these by -1
df.fillna({'reports_id': -1, 'photometry_id': -1, 'num_channels': -1}, inplace=True)

# Set dtypes
df = df.astype({'tns_id': int,
'name': str,
Expand Down

0 comments on commit 988a5c5

Please sign in to comment.