Skip to content

Commit

Permalink
quit if pandas version is too old
Browse files Browse the repository at this point in the history
  • Loading branch information
wendycwong committed Jul 13, 2023
1 parent a1386f2 commit b2cf435
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions h2o-py/tests/testdir_misc/pyunit_gh_15614_polars_2_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,14 @@ def test_polars_pandas():
pyunit_utils.install("pandas")
import pandas
print(pandas.__version__)
if float(pandas.__version__[0]) < 1: # make sure latest pandas is installed >= 1.0.0
subprocess.check_call([sys.executable, "-m", "pip", "uninstall", "-y", "pandas"])
pyunit_utils.install("pandas")
if not(can_use_polars()):
pyunit_utils.install("polars")
if not(can_use_pyarrow()):
pyunit_utils.install("pyarrow")
if float(pandas.__version__[0]) >= 1:
test_frame_conversion("smalldata/glm_test/multinomial_3Class_10KRow.csv", True)
test_frame_conversion("smalldata/titanic/titanic_expanded.csv", False)
test_frame_conversion("smalldata/timeSeries/CreditCard-ts_train.csv", False)
if not(can_use_polars()):
pyunit_utils.install("polars")
if not(can_use_pyarrow()):
pyunit_utils.install("pyarrow")
test_frame_conversion("smalldata/glm_test/multinomial_3Class_10KRow.csv", True)
test_frame_conversion("smalldata/titanic/titanic_expanded.csv", False)
test_frame_conversion("smalldata/timeSeries/CreditCard-ts_train.csv", False)
else:
print("Test skipped due to old pandas version")

Expand Down

0 comments on commit b2cf435

Please sign in to comment.