All Questions
Tagged with sentence-similarity pandas
9 questions
0
votes
2
answers
74
views
Shuffle pandas column while avoiding a condition
I have a dataframe that shows 2 sentences are similar. This dataframe has a 3rd relationship column which also contains some strings. This 3rd column shows how similar the texts are. For instance:
P ...
-1
votes
1
answer
832
views
How to find similarity score between two rows in a pandas data frame
I want to find the similarity of given sentences between two rows.
In my sample data frame:
import pandas as pd
data = [f'Sent {str(i)}' for i in range(10)]
df = pd.DataFrame(data=data, columns=['...
1
vote
1
answer
175
views
Rank the row based on the similar sentences using python or SQL?
How to rank the data frame based on the row value. i.e I have a row that contains text data want to provide the rank based on the similarity? Below is the sample datasets,the original datasets contain ...
1
vote
1
answer
74
views
pandas: row-wise operation to get change over time
I have a large data frame. Sample below
| year | sentences | company |
|------|-------------------|---------|
| 2020 | [list of strings] | A |
| 2019 | [list of strings] | A |
| ...
1
vote
1
answer
382
views
pandas: calculate overlapping words between rows only if values in another column match (issue with multiple instances)
I have a dataframe that looks like the following, but with many rows:
import pandas as pd
data = {'intent': ['order_food', 'order_food','order_taxi','order_call','order_call','order_call','...
0
votes
2
answers
510
views
pandas: calculate overlapping words between rows only if values in another column match
I have a dataframe that looks like the following, but with many rows:
import pandas as pd
data = {'intent': ['order_food', 'order_food','order_taxi','order_call','order_call','order_taxi'],
'Sent': [...
0
votes
1
answer
984
views
Sentence comparison: how to highlight differences
I have the following sequences of strings within a column in pandas:
SEQ
An empty world
So the word is
So word is
No word is
I can check the similarity using fuzzywuzzy or cosine distance.
However I ...
0
votes
0
answers
363
views
Group by one column and compare text similarity pandas
I have a dataframe with almost 1 million rows and columns as below:
VIN Complaints Repairs Key
12234 Customer states engine issues ...
0
votes
1
answer
58
views
Merge two dataframes on two columns
I have 2 dataframes:
dfBB
Rank, Song, Artist, Year
and dfMap
Artist, Song, SongId, ArtistId
I would like to merge them together on the basis of Artist and Song ie: where they match I add the ...