Skip to content

Commit

Permalink
- Remove NaNs before converting to int in TNS
Browse files Browse the repository at this point in the history
- Fix version "number" when using github branch instead of release
  • Loading branch information
loostrum committed Dec 9, 2022
1 parent f041e7b commit b913a44
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 b913a44

Please sign in to comment.