Created
October 7, 2023 14:11
-
-
Save Shaun2h/cf294782c840eaa1223caf2e4ad5bfd0 to your computer and use it in GitHub Desktop.
mars-project/mars#2488 - Replication/Quicktest code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mars | |
import mars.dataframe as md | |
import pandas as pd | |
import numpy as np | |
# NOTE: pytest mars fails with missing module pyarrow. (non-urgent) | |
# mars-project/mars/issues/2488 | |
# TYPE: Recreate error -> 7/10/2023 | |
# Original Report - Reproducibility [package requirements] | |
# https://github.com/mars-project/mars/issues/2488 | |
# Mars - 0.6.11 | |
# pandas - 1.1.3 | |
# Current Proposed - Reproducibility [package requirements] | |
# scipy 1.7.3 | |
# numpy 1.21.6 | |
# pandas 1.3.5 | |
# pip 23.2.1 | |
# pymars 0+untagged.1296.g Commit - 0a42ba8 | |
# Note: Mars Version differs. | |
# Changing between pandas version does not impact error output. Reported error is similar. | |
# Pandas Component | |
b = pd.Series([1, 3, 2, np.nan, np.nan]) | |
# print(b) | |
# 0 1.0 | |
# 1 3.0 | |
# 2 2.0 | |
# 3 NaN | |
# 4 NaN | |
# dtype: float64 | |
b.dropna().sort_values(ignore_index=True) | |
# print(b) | |
# 0 1.0 | |
# 1 3.0 | |
# 2 2.0 | |
# 3 NaN | |
# 4 NaN | |
# dtype: float64 | |
# Mars Component | |
mars.new_session() | |
a = md.Series([1,3,2,np.nan,np.nan]) | |
print(a) # Series(op=SeriesDataSource) - Correct. | |
print("-"*30) | |
# print(a.shape) # (5,) - Correct. | |
# Separating the commands works. | |
# a.dropna() | |
# a.sort_values(ignore_index=True).execute() | |
# Combining does not work. | |
a.dropna().sort_values(ignore_index=True).execute() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment