Merge() without a common column (LARGE DATASET, so no fake_key=1) #21742
Labels
Duplicate Report
Duplicate issue or pull request
Performance
Memory or execution speed performance
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Usage Question
Code Sample, a copy-pastable example if possible
Problem description
I want to marge two dataframes, one table (ips_data) with the IP, IP in decimal format, target (if isp or not). The other table (ripe_features) has the start and end point of an IP range (in decimal), and several values. My goal is to obtain the values of ripe_features when the IP of ips_data is between the range. I did a first attampt creating a fake_key =1, but my ripe_features database is large (over 4 million rows), so this method seems unhealthy.
I want to know if there´s a better way to dod this kind of merge. I was thinking of doing a new list/column 'ip' in the ripe_features with for() loop for each IP in start/end range to return the IP, else return null, and then do a merge with on='ip'.
Expected Output
The text was updated successfully, but these errors were encountered: