Skip to content

Commit 6dd6680

Browse files
author
hfhoffman1144
committed
material update
1 parent 306a854 commit 6dd6680

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

python-polars/README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1-
# Pandas-Groupby
1+
# Python Polars: A Lightning-Fast DataFrame Library
22

3-
Supporting code for the article [Python Polars: A Lightening-Fast DataFrame Library](https://realpython.com/polars-python-lightening-fast-dataframe-library/).
3+
Supporting code for the article [Python Polars: A Lightning-Fast DataFrame Library](https://realpython.com/polars-python-lightening-fast-dataframe-library/).
4+
5+
To run the code in this tutorial, you should have `polars`, `pandas`, `numpy`, `requests`, and `matplotlib` installed in your environment.
6+
7+
If you want to install Polars with all of the library's optional dependencies, you can run:
8+
9+
```console
10+
$ python -m pip install "polars[all]" requests matplotlib
11+
```
12+
13+
Otherwise, you will at least need to include the `pandas` and `numpy` feature flags:
14+
15+
```console
16+
$ python -m pip install "polars[numpy, pandas]" requests matplotlib
17+
```

python-polars/downloads.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import requests
21
import pathlib
2+
import requests
33

44

55
def download_file(file_url: str, local_file_path: pathlib.Path) -> None:
6-
"Download a file from the URL and save it with the specified file name."
6+
"""Download a file and save it with the specified file name."""
77
response = requests.get(file_url)
88
if response:
99
local_file_path.write_bytes(response.content)

python-polars/scanning_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pathlib
2-
from downloads import download_file
32
import polars as pl
3+
from downloads import download_file
44

55
url = "https://data.wa.gov/api/views/f6w7-q2d2/rows.csv?accessType=DOWNLOAD"
66
local_file_path = pathlib.Path("electric_cars.csv")

0 commit comments

Comments
 (0)