Skip to content

Commit f9d9e6e

Browse files
committed
updated README
1 parent 3b5a23b commit f9d9e6e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ A module to display Pandas DataFrames in Textual's DataTable widget.
44

55
## Background
66

7-
Pandas is a popular Python library for data analysis. One of the core components to Pandas is the DataFrame object. A DataFrame is a two-dimensional data structure that represents data in rows and columns.
7+
Pandas is a popular Python library for data analysis. One of the core components of Pandas is the DataFrame object. A DataFrame is a two-dimensional data structure that represents data in rows and columns.
88

9-
Given Pandas DataFrames are tabular in nature, it makes sense to be able to render them in Textual using the DataTable widget.
9+
Given Pandas DataFrames are tabular in nature, it makes sense to be able to render them in Textual using the DataTable widget. Enter the DataFrameTable widget...
1010

1111
## Installation
1212

@@ -26,7 +26,7 @@ First, you'll need to import the `DataFrameTable` widget.
2626
from textual_pandas.widgets import DataFrameTable
2727
```
2828

29-
After importing the widget, you'll need to yield the `DataFrameTable` widget in your app's `compose()` method (like you would with the DataTable widget). Once you're ready to draw the table with your DataFrame data (most likely `on_mount()`), you'll simply call the `add_df()` method and pass in a DataFrame object.
29+
After importing the widget, you'll need to yield the `DataFrameTable` widget in your Textual app's `compose()` method (like you would with the DataTable widget). Once you're ready to draw the table with your DataFrame data (most likely `on_mount()`), you'll simply call the `add_df()` method and pass in a Pandas DataFrame.
3030

3131
```python
3232
from textual.app import App
@@ -48,13 +48,13 @@ class ClassApp(App):
4848
table.add_df(df)
4949
```
5050

51-
That's it! Now you're DataFrame will display within a DataTable widget!
51+
That's it! Now your DataFrame will display within a DataTable widget!
5252

5353
### Updating the DataFrame
5454

55-
If you update your DataFrame and would like to see the updates in your app, then you'll need to use the `update_df` method and pass in your updated DataFrame object.
55+
If you update your DataFrame, and would like to see the updates in your app, then you'll need to use the `update_df()` method and pass in your updated DataFrame object.
5656

57-
If you only want to update the rendered DataTable (without the need to change the DataFrame), you may also use the `update_cell` and `update_cell_at` methods that are provided by the DataTable widget.
57+
If you only want to update the rendered DataFrameTable (without the need to change the DataFrame), you may also use the `update_cell()` and `update_cell_at()` methods that are provided by the DataTable widget.
5858

5959
```python
6060
df.insert(

0 commit comments

Comments
 (0)