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]read multiple csv files error #3472

Open
showkeyjar opened this issue Jun 6, 2023 · 1 comment
Open

[bug]read multiple csv files error #3472

showkeyjar opened this issue Jun 6, 2023 · 1 comment

Comments

@showkeyjar
Copy link

showkeyjar commented Jun 6, 2023

  • Did you find a bug in datatable, or maybe the bug found you?
    Tell us what it is.

  • How to reproduce the bug?
    This part is the most important. Please provide a code snippet which, when
    executed in console, demonstrates the problem. If necessary, attach any data
    files to the issue.

from datatable import iread, rbind

sel_cols = ['c1', 'c2', 'c3', 'c4']
files = ["/data/" + str(f) + ".csv" for f in df_site['station_id'].tolist()]
dt_data = iread(files, columns=sel_cols, errors='ignore')
# error 1: if add 'columns' params to iread, then output is empty
dt_all = rbind(dt_data, force=True)
df_data = dt_all.to_pandas()
# error 2: if not add 'columns', then it throws error: Cannot rbind column of type str32 to a column of type int32
  • What was the expected behavior?
    In case it is not obvious, please tell us what result should your code
    produce.

it must be return a pandas dataframe, or give me some advice how to convert int32 to str32?

  • Your environment?
    What is your datatable version, python version, and operating system?

centos 7
python 3.8
datatable 1.0

  • Tag the issue with [bug] or [segfault] (depending on whether it crashes
    Python or not).

  • Thank you for contributing, and sorry for the inconvenience.

@samukweku
Copy link
Collaborator

kindly provide minimum reproducible example. small file samples you can share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants