Skip to content

Commit

Permalink
Fix the NA/null values
Browse files Browse the repository at this point in the history
  • Loading branch information
petya-vasileva committed Oct 15, 2024
1 parent d2f3ef8 commit fe95c44
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ps-trace_path_changed.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,14 @@ def sendAlarms(data):

# Get the probability for each position, based on src-dest pair
probDf = getProbabilities(posDf, max_ttl)
probDf[~(probDf['asn'].isna()) & ~(probDf['asn']=='')]

# Replace empty strings with NaN first
probDf['asn'].replace('', np.nan, inplace=True)
# Remove rows where 'asn' is NaN (including inf if needed)
probDf = probDf[~probDf['asn'].isna()]

print(f"Python version: {sys.version}")
print(f"Pandas version: {pd.__version__}")


# Find the nodes that work sporadically and add those the the baseline list
Expand Down

0 comments on commit fe95c44

Please sign in to comment.