You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+14-3
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ This module provides easy access to the data of the [OData webservice](https://w
19
19
*[Advanced filter](#advanced-filter)
20
20
*[Large queries](#large-queries)
21
21
*[Credits](#credits)
22
+
*[Development](#development)
22
23
*[Release](#release)
23
24
24
25
## Installation
@@ -144,23 +145,24 @@ To query for date ranges you can use the operators...
144
145
145
146
**Text query**
146
147
147
-
It's possible to write text queries using operators like `eq` (equals), `ne` (not equals), `lt`/`lte` (less than/less than or equals), `gt`/`gte` (greater than/greater than or equals), 'startswith()` and `contains`:
148
+
It's possible to write text queries using operators like `eq` (equals), `ne` (not equals), `lt`/`lte` (less than/less than or equals), `gt` / `gte` (greater than/greater than or equals), `startswith()` and `contains`:
148
149
149
150
```python
150
151
import swissparlpy as spp
151
152
import pandas as pd
152
153
153
154
persons = spp.get_data(
154
155
"Person",
155
-
filter="(startswith(FirstName, 'Ste') or LastName eq 'Seiler') and Language='DE'"
156
+
filter="(startswith(FirstName, 'Ste') or LastName eq 'Seiler') and Language eq 'DE'"
156
157
)
157
158
158
159
df = pd.DataFrame(persons)
159
160
print(df[['FirstName', 'LastName']])
160
161
```
162
+
161
163
**Callable Filter**
162
164
163
-
You can provide a callable as a filter which allows for more advanved filters.
165
+
You can provide a callable as a filter which allows for more advanced filters.
164
166
165
167
`swissparlpy.filter` provides `or_` and `and_`.
166
168
@@ -224,6 +226,15 @@ df_voting50 = pd.concat([pd.read_pickle(os.path.join(path, x)) for x in os.listd
224
226
This library is inspired by the R package [swissparl](https://github.com/zumbov2/swissparl) of [David Zumbach](https://github.com/zumbov2).
225
227
[Ralph Straumann](https://twitter.com/rastrau) initial [asked about a Python version of `swissparl` on Twitter](https://twitter.com/rastrau/status/1441048778740432902), which led to this project.
226
228
229
+
## Development
230
+
231
+
To develop on this project, install `flit`:
232
+
233
+
```
234
+
pip install flit
235
+
flit install -s
236
+
```
237
+
227
238
## Release
228
239
229
240
To create a new release, follow these steps (please respect [Semantic Versioning](http://semver.org/)):
0 commit comments