-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: ecosystem and resources #1468
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.md-typeset ol li, | ||
.md-typeset ul li { | ||
margin-bottom: 0.1em !important; | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
If you haven't, you can follow our [_setting up your environment_](https://github.com/narwhals-dev/narwhals/blob/main/CONTRIBUTING.md#option-1-use-uv-recommended) guide. | ||
Then, run: | ||
|
||
```console | ||
```terminal | ||
uv pip install narwhals | ||
``` | ||
|
||
|
@@ -19,18 +19,20 @@ | |
|
||
Then, run: | ||
|
||
```console | ||
```terminal | ||
python -m pip install narwhals | ||
``` | ||
|
||
### Verifying the Installation | ||
|
||
To verify the installation, start the Python REPL and execute: | ||
|
||
```python | ||
>>> import narwhals | ||
>>> narwhals.__version__ | ||
'1.14.3' | ||
``` | ||
|
||
If you see the version number, then the installation was successful! | ||
|
||
## Quick start | ||
|
@@ -60,7 +62,7 @@ import narwhals as nw | |
from narwhals.typing import IntoFrame | ||
|
||
|
||
def my_function(df_native: IntoFrame) -> list[str]: | ||
def agnostic_get_columns(df_native: IntoFrame) -> list[str]: | ||
df = nw.from_native(df_native) | ||
column_names = df.columns | ||
return column_names | ||
|
@@ -72,17 +74,22 @@ df_polars = pl.DataFrame(data) | |
table_pa = pa.table(data) | ||
|
||
print("pandas output") | ||
print(my_function(df_pandas)) | ||
print(agnostic_get_columns(df_pandas)) | ||
|
||
print("Polars output") | ||
print(my_function(df_polars)) | ||
print(agnostic_get_columns(df_polars)) | ||
|
||
print("PyArrow output") | ||
print(my_function(table_pa)) | ||
print(agnostic_get_columns(table_pa)) | ||
``` | ||
|
||
If you run `python t.py` then your output should look like the above. This is the simplest possible example of a dataframe-agnostic | ||
function - as we'll soon see, we can do much more advanced things. | ||
If you run `python t.py` then your output should look like the above. | ||
This is the simplest possible example of a dataframe-agnostic function - as we'll soon | ||
see, we can do much more advanced things. | ||
|
||
Let's learn about what you just did, and what Narwhals can do for you! | ||
|
||
Note: these examples are only using pandas, Polars and PyArrow. Please see the following to find the [supported libraries](extending.md). | ||
!!! info | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am big fan boy of mkdocs material admonitions π |
||
|
||
These examples are using pandas, Polars and PyArrow, however Narwhals supports | ||
other dataframe libraries (See [supported libraries](extending.md)). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Resources | ||
|
||
## Sponsors and institutional partners | ||
|
||
Narwhals is 100% independent, community-driven, and community-owned. | ||
We are extremely grateful to the following organisations for having | ||
provided some funding / development time: | ||
|
||
- [Quansight Labs](https://labs.quansight.org) | ||
- [Quansight Futures](https://www.qi.ventures) | ||
- [OpenTeams](https://www.openteams.com) | ||
- [POSSEE initiative](https://possee.org) | ||
- [BYU-Idaho](https://www.byui.edu) | ||
|
||
If you contribute to Narwhals on your organization's time, please let us know. We'd be happy to add your employer | ||
to this list! | ||
|
||
## Appears on | ||
|
||
Narwhals has been featured in several talks, podcasts, and blog posts: | ||
|
||
- [Talk Python to me Podcast](https://youtu.be/FSH7BZ0tuE0) | ||
Ahoy, Narwhals are bridging the data science APIs | ||
|
||
- [Python Bytes Podcast](https://www.youtube.com/live/N7w_ESVW40I?si=y-wN1uCsAuJOKlOT&t=382) | ||
Episode 402, topic #2 | ||
|
||
- [Super Data Science: ML & AI Podcast](https://www.youtube.com/watch?v=TeG4U8R0U8U) | ||
Narwhals: For Pandas-to-Polars DataFrame Compatibility | ||
|
||
- [Sample Space Podcast | probabl](https://youtu.be/8hYdq4sWbbQ?si=WG0QP1CZ6gkFf18b) | ||
How Narwhals has many end users ... that never use it directly. - Marco Gorelli | ||
|
||
- [The Real Python Podcast](https://www.youtube.com/watch?v=w5DFZbFYzCM) | ||
Narwhals: Expanding DataFrame Compatibility Between Libraries | ||
|
||
- [Pycon Lithuania](https://www.youtube.com/watch?v=-mdx7Cn6_6E) | ||
Marco Gorelli - DataFrame interoperatiblity - what's been achieved, and what comes next? | ||
|
||
- [Pycon Italy](https://www.youtube.com/watch?v=3IqUli9XsmQ) | ||
How you can write a dataframe-agnostic library - Marco Gorelli | ||
|
||
- [Polars Blog Post](https://pola.rs/posts/lightweight_plotting/) | ||
Polars has a new lightweight plotting backend | ||
|
||
- [Quansight Labs blog post (w/ Scikit-Lego)](https://labs.quansight.org/blog/scikit-lego-narwhals) | ||
How Narwhals and scikit-lego came together to achieve dataframe-agnosticism |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reduces spacing between list items in markdown