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

DataFrameRows iterator (from DataFrames.eachrow) repeats entire dataframe when serialising with JSON3 #280

Open
ahjulstad opened this issue May 14, 2024 · 0 comments

Comments

@ahjulstad
Copy link

Example:

using JSON3, DataFrames

rc = 1000
df = DataFrame(a=1:rc, b=rand('a':'z', rc), c=rand(rc))

println(length(JSON3.write(df)))
println(length(JSON3.write(eachrow(df))))

prints

27327   
27426787

I stumbled upon this trying a naïve approach for outputing the dataframe in record mode. The easiest workaround for me was to use TypedTables and just make a Table out if the dataframe first (instead of creating an iterator).

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

1 participant