Skip to content

Commit

Permalink
use_inf_as_na deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Nov 27, 2023
1 parent 0e80835 commit ffaeb22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mpcontribs-client/mpcontribs/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import gzip
import warnings
import pandas as pd
import numpy as np
import plotly.io as pio
import itertools
import functools
Expand Down Expand Up @@ -88,7 +89,6 @@

j2h = Json2Html()
pd.options.plotting.backend = "plotly"
pd.set_option('mode.use_inf_as_na', True)
pio.templates.default = "simple_white"
warnings.formatwarning = lambda msg, *args, **kwargs: f"{msg}\n"
warnings.filterwarnings("default", category=DeprecationWarning, module=__name__)
Expand Down Expand Up @@ -383,6 +383,7 @@ def from_dict(cls, dct: dict):

def _clean(self):
"""clean the dataframe"""
self.replace([np.inf, -np.inf], np.nan, inplace=True)
self.fillna('', inplace=True)
self.index = self.index.astype(str)
for col in self.columns:
Expand Down

0 comments on commit ffaeb22

Please sign in to comment.