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

Download CSV and Excel #272

Closed
firmai opened this issue May 17, 2024 · 2 comments
Closed

Download CSV and Excel #272

firmai opened this issue May 17, 2024 · 2 comments

Comments

@firmai
Copy link

firmai commented May 17, 2024

Why does CSV and Excel not download, for example in pandas to_csv and to_excel is half a second, but this does not work and when it works takes minutes. Is there a workaround.

from itables import show

import pandas as pd
import numpy as np

# Creating fake data for 100 columns and 6000 rows
np.random.seed(42)  # for reproducibility
data = np.random.rand(6000, 100)  # Random data generation
columns = [f"Column_{i+1}" for i in range(100)]  # Naming the columns as Column_1 to Column_100

# Creating the DataFrame
df_summary = pd.DataFrame(data, columns=columns)
df_summary.head()


show(df_summary, buttons=["copyHtml5", "csvHtml5", "excelHtml5"], maxRows=60000,maxBytes=5000000)

Suprisingly 5000 rows work

@mwouts
Copy link
Owner

mwouts commented May 17, 2024

Hi @firmai , this is currently a limitation in the javascript library datatables.net that we use to render the tables. They are working on it and when the problem gets solved there I will update itables. Please subscribe to #251 for updates.

@mwouts mwouts closed this as not planned Won't fix, can't repro, duplicate, stale May 17, 2024
@firmai
Copy link
Author

firmai commented May 20, 2024

Thanks for that.

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