Skip to content

Commit

Permalink
🐛 Fillna to -1 before casting column Estacao to int in exclude_dupl…
Browse files Browse the repository at this point in the history
…icated method
  • Loading branch information
ronaldokun committed Feb 19, 2024
1 parent 2e82b5e commit 92b4d56
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion extracao/datasources/smp.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ def exclude_duplicated(
f"""Exclude the duplicated rows
Columns considered are defined by the AGG_SMP constant
"""
df['Estação'] = df['Estação'].astype('int')
df['Estação'] = (
df['Estação'].astype('string', copy=False).fillna('-1').astype('int', copy=False)
)
df = df.sort_values('Estação', ignore_index=True)
df['Largura_Emissão(kHz)'] = pd.to_numeric(df['Largura_Emissão(kHz)'], errors='coerce')
# df['Largura_Emissão(kHz)'] = df['Largura_Emissão(kHz)'].fillna(0)
Expand Down

0 comments on commit 92b4d56

Please sign in to comment.