mirror of
https://github.com/rzmk/czv.git
synced 2025-12-19 08:09:24 +00:00
docs: show types in Python examples
This commit is contained in:
parent
786d0f38ba
commit
25a2568ea0
3 changed files with 13 additions and 8 deletions
|
|
@ -72,14 +72,14 @@ Or use [`uv pip`](https://github.com/astral-sh/uv) instead of `pip`.
|
||||||
```python
|
```python
|
||||||
import czv
|
import czv
|
||||||
|
|
||||||
data = """fruits,price
|
data: str = """fruits,price
|
||||||
apple,2.50
|
apple,2.50
|
||||||
banana,3.00
|
banana,3.00
|
||||||
strawberry,1.50"""
|
strawberry,1.50"""
|
||||||
|
|
||||||
output = czv.row_count(file_data=data, include_header_row=True)
|
output: int = czv.row_count(file_data=data, include_header_row=True)
|
||||||
|
|
||||||
print(output)
|
print(output) # 4
|
||||||
```
|
```
|
||||||
|
|
||||||
## Available operations
|
## Available operations
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,16 @@ pip install czv
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from czv import row_count
|
import czv
|
||||||
|
|
||||||
output = row_count(file_path="fruits.csv")
|
data: str = \"""fruits,price
|
||||||
|
apple,2.50
|
||||||
|
banana,3.00
|
||||||
|
strawberry,1.50\"""
|
||||||
|
|
||||||
print(output)
|
output: int = czv.row_count(file_data=data, include_header_row=True)
|
||||||
|
|
||||||
|
print(output) # 4
|
||||||
```
|
```
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import czv
|
import czv
|
||||||
|
|
||||||
data = """fruits,price
|
data: str = """fruits,price
|
||||||
apple,2.50
|
apple,2.50
|
||||||
banana,3.00
|
banana,3.00
|
||||||
strawberry,1.50"""
|
strawberry,1.50"""
|
||||||
|
|
||||||
output = czv.row_count(file_data=data, include_header_row=True)
|
output: int = czv.row_count(file_data=data, include_header_row=True)
|
||||||
|
|
||||||
print(output) # 4
|
print(output) # 4
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue