All Questions
29 questions
0
votes
1
answer
105
views
Merge two tables from names
I have two table that has football players data and I will merge them from the name feature however one table has feature 'long_name' and other has 'short_name'. For example one player has name "...
0
votes
2
answers
90
views
merging dataframes with partial string matching
I'd like to do a merge by matching only part of the string, please keep in mind that all the columns are object type and I would like to keep them that way if possible
clr_null = pd.DataFrame({'...
1
vote
1
answer
68
views
want to apply merge function on column A
How can I apply merge function or any other method on column A.
For example in layman term I want to convert this string "(A|B|C,D)|(A,B|C|D)|(B|C|D)" into a
"(D A|D B|D C)|(A B|A C|A D)...
0
votes
1
answer
61
views
Merging strings of people's names in pandas
I have two datasets that I want to merge based off the persons name. One data set player_nationalities has their full name:
Player, Nationality
Kylian Mbappé, France
Wissam Ben Yedder, France
...
1
vote
1
answer
553
views
merge two datasets based on a string match
I have two datasets;
DF1 contains a column that has a short word.
DF2 has a column with a series of words, where in some cases they start with the short word from DF1
I would like to create a new ...
0
votes
0
answers
77
views
Join big dataframes based on partial string-match between columns
Two DataFrames have gene and isoform names that are not formatted the same way. I'd like to do a join and add the df2 columns name, isoform for all partial string matches between the isoform (df2) ...
0
votes
1
answer
106
views
Unable to merge Dataframes : Getting Value Error
I'm currently trying to merge 2 dataframes based on a "key" that is created as a combination of alphanumeric and special characters. I'm getting a "Value error: can not merge DataFrame ...
1
vote
0
answers
77
views
Pandas "Advanced" Merge on Substring
I have two dataframes:
df1:
locality
0 Chicago, IL
1 San Francisco, CA
2 Chic, TN
df2:
City County
0 San Francisco San Francisco County
1 Chic Dyer County
2 Chicago ...
1
vote
2
answers
357
views
Replacing a column in a dataframe with another dataframe column using partial string match
I have the large CSVs with following sample dataframes:
df1 =
Index Fruit Vegetable
0 Mango Spinach
1 Berry Carrot
2 Banana Cabbage
df2 =
Index Unit ...
0
votes
1
answer
2k
views
Merging two data frames in pandas that don't have the same column names and are different lengths
I have two data frames that I want to merge, problem is they are not the same length and don't have columns that overlap. I basically want to match the website with the company name, so they are all ...
0
votes
2
answers
844
views
Pandas - Create new column w/values from another column based on str contains
I have two DataFrames. One with multiple columns and other with just one. So what I need is to join based on partial str of a column.
Example:
df1
Name
Classification
A
Transport/Bicycle/Mountain
B
...
0
votes
2
answers
298
views
Yet another question on pandas partial string merge
I know, there have been a number of very close examples, but I can't make them work for me. I want to add a column from another dataframe based on partial string match: The one string is contained in ...
0
votes
1
answer
54
views
Problem with finding difference between left and outer join in Pandas
I am merging two dataframes based on two strings of and my presumption is that these strings will have many instances that logically should match but do not because of different formatting (country ...
3
votes
3
answers
2k
views
Merge two dataframes based on partial startswith match
I have two dataframe that I want to merge based on a partial match of start with (rows in df2.B that start with df1.A in the example below and the values of these columns are strings, which could be ...
0
votes
1
answer
44
views
What is the most pythonic way to combine multiple string columns to create a new Pandas series?
I have a large dataframe with each row containing various amounts of text/string data (song lyrics that were webscraped and then split by line '\n'). Some columns have None values because of this. I'd ...