Skip to content
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

BUG: df.map_chunk with empty DataFrame cannot work #723

Open
qinxuye opened this issue Sep 26, 2023 · 0 comments · May be fixed by #727
Open

BUG: df.map_chunk with empty DataFrame cannot work #723

qinxuye opened this issue Sep 26, 2023 · 0 comments · May be fixed by #727
Labels
bug Something isn't working
Milestone

Comments

@qinxuye
Copy link
Contributor

qinxuye commented Sep 26, 2023

Describe the bug

df.map_chunk with empty DataFrame cannot work.

To Reproduce

To help us to reproduce this bug, please provide information below:

  1. Your Python version
  2. The version of Xorbits you use
  3. Versions of crucial packages, such as numpy, scipy and pandas
  4. Full stack of the error.
  5. Minimized code to reproduce the error.
In [2]: import xorbits

In [3]: xorbits.init()
2023-09-26 15:55:08,918 xorbits._mars.deploy.oscar.local 86719 WARNING  Web service started at http://0.0.0.0:36934

In [4]: df = pd.DataFrame(columns=['a', 'b', 'c'])

In [5]: def p(d):
   ...:     if not len(d):
   ...:         return pd.DataFrame([[None] * d.shape[1]], columns=d.columns)
   ...:     else:
   ...:         return d
   ...: 

In [6]: df.map_chunk(p)  # should not be empty
100%|████████████████████████████████████| 100.00/100 [00:00<00:00, 2450.02it/s]

Empty DataFrame
Columns: [a, b, c]
Index: []
@XprobeBot XprobeBot added the bug Something isn't working label Sep 26, 2023
@XprobeBot XprobeBot added this to the v0.7.0 milestone Sep 26, 2023
@ChengjieLi28 ChengjieLi28 linked a pull request Sep 28, 2023 that will close this issue
2 tasks
@XprobeBot XprobeBot modified the milestones: v0.7.0, v0.7.1 Oct 23, 2023
@XprobeBot XprobeBot modified the milestones: v0.7.1, v0.7.2 Nov 21, 2023
@XprobeBot XprobeBot modified the milestones: v0.7.2, v0.7.3 Jan 5, 2024
@XprobeBot XprobeBot modified the milestones: v0.7.3, v0.7.4 Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants