Skip to content

Commit

Permalink
Update pandas to 2.0.1 in compatible template flavors and replace ass…
Browse files Browse the repository at this point in the history
…calar with item in test dataframe.py, because asscalar was removed
  • Loading branch information
tkilias committed May 4, 2023
1 parent 4cb6de4 commit 1bce18c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pandas|1.3.4
numpy|1.21.3
pandas|2.0.1
numpy|1.24.3
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
python|3.8.13
numpy|1.22.3
pandas|1.4.2
numpy|1.24.3
pandas|2.0.1
libblas|3.9.0=15_linux64_mkl
mamba|1.3.1
ld_impl_linux-64|2.36.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
python|3.8.13
numpy|1.22.3
pandas|1.4.2
numpy|1.24.3
pandas|2.0.1
libblas|3.9.0=15_linux64_mkl
mamba|1.3.1
ld_impl_linux-64|2.36.1
Expand Down
12 changes: 6 additions & 6 deletions test_container/tests/test/python3/all/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def test_dataframe_scalar_returns(self):
def run(ctx):
df = ctx.get_dataframe()
return np.asscalar(df.iloc[0, 0] + df.iloc[0, 1])
return (df.iloc[0, 0] + df.iloc[0, 1]).item()
/
''' % (self.col_defs_str))
self.query(udf_sql)
Expand Down Expand Up @@ -217,7 +217,7 @@ def test_dataframe_scalar_emits_unique(self):
def run(ctx):
df = ctx.get_dataframe()
ctx.emit(np.asscalar(df.C0))
ctx.emit(df.C0.item())
/
''')
print(udf_sql)
Expand All @@ -236,7 +236,7 @@ def test_dataframe_scalar_emits_all_unique(self):
def run(ctx):
df = ctx.get_dataframe(num_rows="all")
ctx.emit(np.asscalar(df.C0))
ctx.emit(df.C0.item())
/
''')
print(udf_sql)
Expand Down Expand Up @@ -331,7 +331,7 @@ def test_dataframe_set_returns(self):
def run(ctx):
df = ctx.get_dataframe(num_rows="all")
return np.asscalar(df.iloc[:, 0].sum())
return df.iloc[:, 0].sum().item()
/
''' % (self.col_defs_str))
print(udf_sql)
Expand Down Expand Up @@ -477,7 +477,7 @@ def run(ctx):
df = ctx.get_dataframe(num_rows=1)
if df is None:
break
ctx.emit(np.asscalar(df.C0))
ctx.emit(df.C0.item())
/
''')
print(udf_sql)
Expand All @@ -500,7 +500,7 @@ def run(ctx):
if df is None:
break
for i in range(df.shape[0]):
ctx.emit(np.asscalar(df.iloc[i, 0]))
ctx.emit(df.iloc[i, 0].item())
/
''')
print(udf_sql)
Expand Down

0 comments on commit 1bce18c

Please sign in to comment.