-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Concatenating two pandas.Series objects results in modin.pandas.dataframe #919
Comments
Hi @fritz-morgendorfer, thanks for posting ! import modin.pandas as pd
s1 = pd.Series(['a', 'b']) # type(s1) modin.pandas.series.Series
s2 = pd.Series(['X', 'Y']) # type(s2) modin.pandas.series.Series
s = pd.concat([s1, s2], axis=0) # type(s) modin.pandas.series.Series In case you have s1 = pd.Series(pandas.Series(['a', 'b']))
s2 = pd.Series(pandas.Series(['X', 'Y']))
s = pd.concat([s1, s2], axis=0) Let me know if this solves the issues |
Thanks for the response. I was just wondering if it is possible to really change just one line of code in my existing project to enjoy all the benefits. I woundn't like to change anything more than the import statement. While it is obviously not yet the case with the project under consideration, the proposed solution would help if I were working on new code. |
When working only with modin this is not an expected behavior. |
@fritz-morgendorfer Is there a |
Closing this for now, please feel free to reopen if the issue persists! |
System information
import pandas
import modin.pandas as pd
s1 = pandas.Series(['a', 'b']) # type(s1) pandas.core.series.Series
s2 = pandas.Series(['X', 'Y']) # type(s2) pandas.core.series.Series
s = pd.concat([s1, s2], axis=0)
type(s) # modin.pandas.dataframe.DataFrame
Describe the problem
In the original script using pandas I have a pandas.DataFrame, where I take two pandas.Series and concatinate them on axis=0. The resulting series is then used as input for parameter data={'name': my_series} in the pandas.DataFrame(...) command.
While substituing pandas with modin.pandas, the two columns taken from modin.pandas.DataFrame, being pandas.Series objects, are concatinated not into modin.pandas.Series but into modin.pandas.DataFrame which then breaks the skript.
Source code / logs
The text was updated successfully, but these errors were encountered: