-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add source for 'elastic.co/guide' to 'docs/guide'
- Loading branch information
1 parent
95b8d75
commit ae96558
Showing
152 changed files
with
2,176 additions
and
1,555 deletions.
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 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,9 @@ | ||
= eland | ||
|
||
:doctype: book | ||
|
||
include::{asciidoc-dir}/../../shared/attributes.asciidoc[] | ||
|
||
include::overview.asciidoc[] | ||
|
||
include::installation.asciidoc[] |
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,16 @@ | ||
[[installation]] | ||
== Installation | ||
|
||
Eland can be installed with https://pip.pypa.io[pip] from https://pypi.org/project/eland[PyPI]: | ||
|
||
[source,sh] | ||
----------------------------- | ||
$ python -m pip install eland | ||
----------------------------- | ||
|
||
and can also be installed with https://docs.conda.io[Conda] from https://anaconda.org/conda-forge/eland[Conda Forge]: | ||
|
||
[source,sh] | ||
------------------------------------ | ||
$ conda install -c conda-forge eland | ||
------------------------------------ |
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,66 @@ | ||
[[overview]] | ||
== Overview | ||
|
||
Eland is a Python client and toolkit for DataFrames and {ml} in {es}. | ||
Full documentation is available on https://eland.readthedocs.io[Read the Docs]. | ||
Source code is available on https://github.com/elastic/eland[GitHub]. | ||
|
||
[discrete] | ||
=== Compatibility | ||
|
||
The library is compatible with all {es} versions since `7.6.x` but you | ||
**have to use a matching major version**: | ||
|
||
The recommended way to set your requirements in your `setup.py` or | ||
`requirements.txt` is:: | ||
|
||
# Elasticsearch 7.x | ||
eland>=7,<8 | ||
|
||
Because Eland uses some experimental APIs for {ml} it | ||
is also recommended to install the same major and minor for `elasticsearch-py` | ||
as your cluster. For example if your cluster is v7.8.1 you would install | ||
like so:: | ||
|
||
$ python -m pip install 'eland>=7,<8' 'elasticsearch>=7.8,<7.9' | ||
|
||
[discrete] | ||
=== Getting Started | ||
|
||
Create a `DataFrame` object connected to an {es} cluster running on `localhost:9200`: | ||
|
||
[source,python] | ||
------------------------------------ | ||
>>> import eland as ed | ||
>>> df = ed.DataFrame( | ||
... es_client="localhost:9200", | ||
... es_index_pattern="flights", | ||
... ) | ||
>>> df | ||
AvgTicketPrice Cancelled ... dayOfWeek timestamp | ||
0 841.265642 False ... 0 2018-01-01 00:00:00 | ||
1 882.982662 False ... 0 2018-01-01 18:27:00 | ||
2 190.636904 False ... 0 2018-01-01 17:11:14 | ||
3 181.694216 True ... 0 2018-01-01 10:33:28 | ||
4 730.041778 False ... 0 2018-01-01 05:13:00 | ||
... ... ... ... ... ... | ||
13054 1080.446279 False ... 6 2018-02-11 20:42:25 | ||
13055 646.612941 False ... 6 2018-02-11 01:41:57 | ||
13056 997.751876 False ... 6 2018-02-11 04:09:27 | ||
13057 1102.814465 False ... 6 2018-02-11 08:28:21 | ||
13058 858.144337 False ... 6 2018-02-11 14:54:34 | ||
[13059 rows x 27 columns] | ||
------------------------------------ | ||
|
||
Eland can also be used for complex queries and aggregations: | ||
|
||
[source,python] | ||
------------------------------------ | ||
>>> df[df.Carrier != "Kibana Airlines"].groupby("Carrier").mean(numeric_only=False) | ||
AvgTicketPrice Cancelled timestamp | ||
Carrier | ||
ES-Air 630.235816 0.129814 2018-01-21 20:45:00.200000000 | ||
JetBeats 627.457373 0.134698 2018-01-21 14:43:18.112400635 | ||
Logstash Airways 624.581974 0.125188 2018-01-21 16:14:50.711798340 | ||
------------------------------------ |
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.