@@ -30,7 +30,7 @@ A DataFrame represents a logical plan that is lazily evaluated. The actual execu
3030terminal operations like ``collect() ``, ``show() ``, or ``to_pandas() `` are called.
3131
3232Creating DataFrames
33- ------------------
33+ -------------------
3434
3535DataFrames can be created in several ways:
3636
@@ -76,7 +76,7 @@ DataFrames can be created in several ways:
7676 df = ctx.from_arrow(batch)
7777
7878 Common DataFrame Operations
79- --------------------------
79+ ---------------------------
8080
8181DataFusion's DataFrame API offers a wide range of operations:
8282
@@ -122,7 +122,7 @@ DataFusion's DataFrame API offers a wide range of operations:
122122 df = df.drop(" temporary_column" )
123123
124124 Terminal Operations
125- ------------------
125+ -------------------
126126
127127To materialize the results of your DataFrame operations:
128128
@@ -145,14 +145,14 @@ To materialize the results of your DataFrame operations:
145145 count = df.count()
146146
147147 HTML Rendering in Jupyter
148- ------------------------
148+ -------------------------
149149
150150When working in Jupyter notebooks or other environments that support rich HTML display,
151151DataFusion DataFrames automatically render as nicely formatted HTML tables. This functionality
152152is provided by the ``_repr_html_ `` method, which is automatically called by Jupyter.
153153
154154Basic HTML Rendering
155- ~~~~~~~~~~~~~~~~~~~
155+ ~~~~~~~~~~~~~~~~~~~~
156156
157157In a Jupyter environment, simply displaying a DataFrame object will trigger HTML rendering:
158158
@@ -165,13 +165,13 @@ In a Jupyter environment, simply displaying a DataFrame object will trigger HTML
165165 display(df)
166166
167167 HTML Rendering Customization
168- ---------------------------
168+ ----------------------------
169169
170170DataFusion provides extensive customization options for HTML table rendering through the
171171``datafusion.html_formatter `` module.
172172
173173Configuring the HTML Formatter
174- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
174+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
175175
176176You can customize how DataFrames are rendered by configuring the formatter:
177177
@@ -194,7 +194,7 @@ You can customize how DataFrames are rendered by configuring the formatter:
194194 )
195195
196196 Custom Style Providers
197- ~~~~~~~~~~~~~~~~~~~~~
197+ ~~~~~~~~~~~~~~~~~~~~~~
198198
199199For advanced styling needs, you can create a custom style provider class:
200200
@@ -213,7 +213,7 @@ For advanced styling needs, you can create a custom style provider class:
213213 configure_formatter(style_provider = CustomStyleProvider())
214214
215215 Custom Type Formatters
216- ~~~~~~~~~~~~~~~~~~~~~
216+ ~~~~~~~~~~~~~~~~~~~~~~
217217
218218You can register custom formatters for specific data types:
219219
@@ -236,7 +236,7 @@ You can register custom formatters for specific data types:
236236 formatter.register_formatter(datetime.date, format_date)
237237
238238 Custom Cell Builders
239- ~~~~~~~~~~~~~~~~~~~
239+ ~~~~~~~~~~~~~~~~~~~~
240240
241241For complete control over cell rendering:
242242
@@ -260,7 +260,7 @@ For complete control over cell rendering:
260260 formatter.set_custom_cell_builder(custom_cell_builder)
261261
262262 Custom Header Builders
263- ~~~~~~~~~~~~~~~~~~~~~
263+ ~~~~~~~~~~~~~~~~~~~~~~
264264
265265Similarly, you can customize the rendering of table headers:
266266
@@ -273,7 +273,7 @@ Similarly, you can customize the rendering of table headers:
273273 formatter.set_custom_header_builder(custom_header_builder)
274274
275275 Managing Formatter State
276- -----------------------
276+ -----------------------~
277277
278278The HTML formatter maintains global state that can be managed:
279279
@@ -291,7 +291,7 @@ The HTML formatter maintains global state that can be managed:
291291 formatter = get_formatter()
292292
293293 Advanced Example: Dashboard-Style Formatting
294- ------------------------------------------
294+ ------------------------------------------~~
295295
296296This example shows how to create a dashboard-like styling for your DataFrames:
297297
@@ -355,7 +355,7 @@ This example shows how to create a dashboard-like styling for your DataFrames:
355355 formatter.register_formatter(float , format_number)
356356
357357 Best Practices
358- -------------
358+ --------------
359359
3603601. **Memory Management **: For large datasets, use ``max_memory_bytes `` to limit memory usage.
361361
@@ -368,7 +368,7 @@ Best Practices
3683685. **Cell Expansion **: Use ``enable_cell_expansion=True `` when cells might contain longer content that users may want to see in full.
369369
370370Additional Resources
371- -------------------
371+ --------------------
372372
373373* `DataFusion User Guide <../user-guide/dataframe.html >`_ - Complete guide to using DataFrames
374374* `API Reference <https://arrow.apache.org/datafusion-python/api/index.html >`_ - Full API reference
0 commit comments