Datasets:
Update README.md
Browse files
README.md
CHANGED
|
@@ -13,6 +13,10 @@ pretty_name: French Local Administrations Directory
|
|
| 13 |
size_categories:
|
| 14 |
- 10K<n<100K
|
| 15 |
license: etalab-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
---
|
| 17 |
|
| 18 |
# 🇫🇷 French Local Administrations Directory Dataset
|
|
@@ -89,8 +93,20 @@ The resulting embedding vector is stored in the `embeddings_bge-m3` column as a
|
|
| 89 |
## 📌 Embeddings Notice
|
| 90 |
|
| 91 |
⚠️ The `embeddings_bge-m3` column is stored as a stringified list (e.g., `"[-0.03062629,-0.017049594,...]"`).
|
| 92 |
-
To use it as a vector, you need to parse it into a list of floats or NumPy array. For example:
|
| 93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
```python
|
| 95 |
import pandas as pd
|
| 96 |
import json
|
|
@@ -100,6 +116,8 @@ df = pd.read_parquet(path="local-administrations-directory-latest/") # Assuming
|
|
| 100 |
df["embeddings_bge-m3"] = df["embeddings_bge-m3"].apply(json.loads)
|
| 101 |
```
|
| 102 |
|
|
|
|
|
|
|
| 103 |
## 📚 Source & License
|
| 104 |
|
| 105 |
## 🔗 Source :
|
|
|
|
| 13 |
size_categories:
|
| 14 |
- 10K<n<100K
|
| 15 |
license: etalab-2.0
|
| 16 |
+
configs:
|
| 17 |
+
- config_name: latest
|
| 18 |
+
data_files: "data/local-administrations-directory-latest/*.parquet"
|
| 19 |
+
default: true
|
| 20 |
---
|
| 21 |
|
| 22 |
# 🇫🇷 French Local Administrations Directory Dataset
|
|
|
|
| 93 |
## 📌 Embeddings Notice
|
| 94 |
|
| 95 |
⚠️ The `embeddings_bge-m3` column is stored as a stringified list (e.g., `"[-0.03062629,-0.017049594,...]"`).
|
| 96 |
+
To use it as a vector, you need to parse it into a list of floats or NumPy array. For example, if you want to load the dataset into a dataframe by using the `datasets` library:
|
| 97 |
|
| 98 |
+
```python
|
| 99 |
+
import pandas as pd
|
| 100 |
+
import json
|
| 101 |
+
from datasets import load_dataset
|
| 102 |
+
# The Pyarrow library must be installed in your Python environment for this example. By doing => pip install pyarrow
|
| 103 |
+
|
| 104 |
+
dataset = load_dataset("AgentPublic/local-administrations-directory")
|
| 105 |
+
df = pd.DataFrame(dataset['train'])
|
| 106 |
+
df["embeddings_bge-m3"] = df["embeddings_bge-m3"].apply(json.loads)
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
Otherwise, if you already downloaded all parquet files from the `data/local-administrations-directory-latest/` folder :
|
| 110 |
```python
|
| 111 |
import pandas as pd
|
| 112 |
import json
|
|
|
|
| 116 |
df["embeddings_bge-m3"] = df["embeddings_bge-m3"].apply(json.loads)
|
| 117 |
```
|
| 118 |
|
| 119 |
+
You can then use the dataframe as you wish, such as by inserting the data from the dataframe into the vector database of your choice.
|
| 120 |
+
|
| 121 |
## 📚 Source & License
|
| 122 |
|
| 123 |
## 🔗 Source :
|