Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/sasctl/_services/score_execution.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
import time
import warnings
from distutils.version import StrictVersion
from packaging.version import Version
from typing import Union

import pandas as pd
Expand Down Expand Up @@ -219,7 +219,7 @@ def _no_gateway_get_results(cls, server_name, library_name, table_name):
Pandas Dataframe

"""
if pd.__version__ >= StrictVersion("1.0.3"):
if Version(pd.__version__) >= Version("1.0.3"):
from pandas import json_normalize
else:
from pandas.io.json import json_normalize
Expand Down
4 changes: 2 additions & 2 deletions src/sasctl/pzmm/model_parameters.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright (c) 2022, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import json
from distutils.version import StrictVersion
from pathlib import Path
from typing import Any, Optional, Tuple, Union

import pandas as pd
from packaging.version import Version
from pandas import DataFrame

from .._services.model_repository import ModelRepository as mr
Expand Down Expand Up @@ -325,7 +325,7 @@ def get_project_kpis(
missing values are replaced with pandas-valid missing values.
"""
# Check the pandas version for where the json_normalize function exists
if pd.__version__ >= StrictVersion("1.0.3"):
if Version(pd.__version__) >= Version("1.0.3"):
from pandas import json_normalize
else:
from pandas.io.json import json_normalize
Expand Down
4 changes: 2 additions & 2 deletions src/sasctl/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -895,12 +895,12 @@ def get_project_kpis(
A pandas DataFrame representing the MM_STD_KPI table. Note that SAS
missing values are replaced with pandas valid missing values.
"""
from distutils.version import StrictVersion
from packaging.version import Version

from .core import is_uuid

# Check the pandas version for where the json_normalize function exists
if pd.__version__ >= StrictVersion("1.0.3"):
if Version(pd.__version__) >= Version("1.0.3"):
from pandas import json_normalize
else:
from pandas.io.json import json_normalize
Expand Down
Loading