Skip to content

Conversation

jseldess
Copy link
Contributor

@jseldess jseldess commented Aug 6, 2024

Problem

The dataframe column is values, not vectors.

from pinecone import Pinecone, ServerlessSpec
from pinecone_datasets import list_datasets, load_dataset

pc = Pinecone(api_key="xxx")

dataset = load_dataset("quora_all-MiniLM-L6-bm25")

print(dataset.head())
  id                                             values  \
0  1  [0.06814987, -0.039664183, -0.06096721, 0.0074...
1  2  [0.08983771, -0.03493085, -0.057357617, 0.0222...
2  3  [-0.046798065, 0.1551149, -0.03920019, 0.04878...
3  4  [-0.077349104, 0.14786911, -0.0128817065, -0.0...
4  5  [-0.028324936, 0.037209604, -0.00040033547, 0....

                                       sparse_values metadata  \
0  {'indices': [7096, 8508, 13677, 23041, 24734, ...     None
1  {'indices': [7096, 8508, 13677, 24734, 26026, ...     None
2  {'indices': [6065, 13677, 17109, 20780, 24734,...     None
3  {'indices': [2408, 6065, 7582, 12225, 17109, 2...     None
4  {'indices': [5388, 12812, 18181, 19960, 20780,...     None

                                                blob
0  {'text': ' What is the step by step guide to i...
1  {'text': ' What is the step by step guide to i...
2  {'text': ' What is the story of Kohinoor (Koh-...
3  {'text': ' What would happen if the Indian gov...
4  {'text': ' How can I increase the speed of my ...

Solution

Fixed the column name.

Closes: #374

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

Describe specific steps for validating this change.


The dataframe column is "values", not "vectors.

```
from pinecone import Pinecone, ServerlessSpec
from pinecone_datasets import list_datasets, load_dataset

pc = Pinecone(api_key="xxx")

dataset = load_dataset("quora_all-MiniLM-L6-bm25")

print(dataset.head())
```

```
  id                                             values  \
0  1  [0.06814987, -0.039664183, -0.06096721, 0.0074...
1  2  [0.08983771, -0.03493085, -0.057357617, 0.0222...
2  3  [-0.046798065, 0.1551149, -0.03920019, 0.04878...
3  4  [-0.077349104, 0.14786911, -0.0128817065, -0.0...
4  5  [-0.028324936, 0.037209604, -0.00040033547, 0....

                                       sparse_values metadata  \
0  {'indices': [7096, 8508, 13677, 23041, 24734, ...     None
1  {'indices': [7096, 8508, 13677, 24734, 26026, ...     None
2  {'indices': [6065, 13677, 17109, 20780, 24734,...     None
3  {'indices': [2408, 6065, 7582, 12225, 17109, 2...     None
4  {'indices': [5388, 12812, 18181, 19960, 20780,...     None

                                                blob
0  {'text': ' What is the step by step guide to i...
1  {'text': ' What is the step by step guide to i...
2  {'text': ' What is the story of Kohinoor (Koh-...
3  {'text': ' What would happen if the Indian gov...
4  {'text': ' How can I increase the speed of my ...
```
@jseldess jseldess requested a review from anawishnoff August 6, 2024 15:46
@jhamon jhamon self-requested a review August 6, 2024 15:50
@jseldess jseldess merged commit 3c1e4e0 into main Aug 7, 2024
@jseldess jseldess deleted the typo-fix branch August 7, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[documentation] DataFrame column name is wrong

3 participants