|
22 | 22 | import pyarrow as pa # type: ignore |
23 | 23 | import pytest |
24 | 24 |
|
25 | | -import bigframes.dataframe as dataframe |
26 | 25 | import bigframes.pandas |
27 | 26 | import bigframes.series as series |
28 | 27 | from tests.system.utils import assert_pandas_df_equal, assert_series_equal |
@@ -2267,24 +2266,21 @@ def test_dot(scalars_dfs): |
2267 | 2266 | assert bf_result == pd_result |
2268 | 2267 |
|
2269 | 2268 |
|
2270 | | -def test_dot_df(scalars_dfs): |
2271 | | - scalars_df, scalars_pandas_df = scalars_dfs |
2272 | | - bf_result = scalars_df["int64_too"] @ scalars_df[["int64_col", "int64_too"]] |
2273 | | - pd_result = ( |
2274 | | - scalars_pandas_df["int64_too"] @ scalars_pandas_df[["int64_col", "int64_too"]] |
2275 | | - ) |
| 2269 | +def test_dot_df(matrix_3by4_df, matrix_3by4_pandas_df): |
| 2270 | + bf_result = matrix_3by4_df["w"] @ matrix_3by4_df |
| 2271 | + pd_result = matrix_3by4_pandas_df["w"] @ matrix_3by4_pandas_df |
2276 | 2272 |
|
2277 | 2273 | pd.testing.assert_series_equal( |
2278 | 2274 | bf_result.to_pandas(), pd_result, check_index_type=False, check_dtype=False |
2279 | 2275 | ) |
2280 | 2276 |
|
2281 | 2277 |
|
2282 | | -def test_dot_df_inline(scalars_dfs): |
2283 | | - left = [10, 11, 12, 13] # series data |
2284 | | - right = [[0, 1], [-2, 3], [4, -5], [6, 7]] # dataframe data |
2285 | | - |
2286 | | - bf_result = series.Series(left) @ dataframe.DataFrame(right) |
2287 | | - pd_result = pd.Series(left) @ pd.DataFrame(right) |
| 2278 | +def test_dot_df_with_na(scalars_dfs): |
| 2279 | + scalars_df, scalars_pandas_df = scalars_dfs |
| 2280 | + bf_result = scalars_df["int64_too"] @ scalars_df[["int64_col", "int64_too"]] |
| 2281 | + pd_result = ( |
| 2282 | + scalars_pandas_df["int64_too"] @ scalars_pandas_df[["int64_col", "int64_too"]] |
| 2283 | + ) |
2288 | 2284 |
|
2289 | 2285 | pd.testing.assert_series_equal( |
2290 | 2286 | bf_result.to_pandas(), pd_result, check_index_type=False, check_dtype=False |
|
0 commit comments