Skip to content

DataFrame and Series Images #2077

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

Open
DerekMelchin opened this issue Mar 21, 2025 · 0 comments
Open

DataFrame and Series Images #2077

DerekMelchin opened this issue Mar 21, 2025 · 0 comments

Comments

@DerekMelchin
Copy link
Collaborator

Almost all of the DataFrame and Series objects throughout the docs are just images. We should update them to be HTML tables so Mia can understand them better. To generate the HTML, you can use the following code snippet in the Research Environment:

print(history.to_html(border=0, justify='right', classes='python', max_rows=10, show_dimensions=False)) # max_cols=8

The number of columns should match the columns that display in the Research Environment. For styling, wrap the HTML table with <div class='dataframe-wrapper'> and </div>.

When replacing the images of pandas Series objects, we can use

<div class="python section-example-container">
    <pre>symbol  time               
SPY     2024-12-13 16:00:00   -0.000199
        2024-12-16 16:00:00    0.004270
        2024-12-17 16:00:00   -0.004120
        2024-12-18 16:00:00   -0.029804
Name: close, dtype: float64</pre>
</div>
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