Skip to content

Commit dca035c

Browse files
committed
fix: correct formatting inconsistencies in dataframe.rst
1 parent 5f203e3 commit dca035c

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

docs/source/api/dataframe.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ A DataFrame represents a logical plan that is lazily evaluated. The actual execu
3030
terminal operations like ``collect()``, ``show()``, or ``to_pandas()`` are called.
3131

3232
Creating DataFrames
33-
------------------
33+
-------------------
3434

3535
DataFrames 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

8181
DataFusion'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

127127
To 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

150150
When working in Jupyter notebooks or other environments that support rich HTML display,
151151
DataFusion DataFrames automatically render as nicely formatted HTML tables. This functionality
152152
is provided by the ``_repr_html_`` method, which is automatically called by Jupyter.
153153

154154
Basic HTML Rendering
155-
~~~~~~~~~~~~~~~~~~~
155+
~~~~~~~~~~~~~~~~~~~~
156156

157157
In 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

170170
DataFusion provides extensive customization options for HTML table rendering through the
171171
``datafusion.html_formatter`` module.
172172

173173
Configuring the HTML Formatter
174-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
174+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
175175

176176
You 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

199199
For 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

218218
You 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

241241
For 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

265265
Similarly, 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

278278
The 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

296296
This 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

360360
1. **Memory Management**: For large datasets, use ``max_memory_bytes`` to limit memory usage.
361361

@@ -368,7 +368,7 @@ Best Practices
368368
5. **Cell Expansion**: Use ``enable_cell_expansion=True`` when cells might contain longer content that users may want to see in full.
369369

370370
Additional 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

Comments
 (0)