25,241 questions
3
votes
1
answer
116
views
Use pandas merge_asof to achieve inexact left join
I have two pandas series:
right_series
Index
Value
1
0.1
2
0.2
3
0.3
6
0.6
7
0.7
left_series
Index
Value
1
0.1
5
0.5
10
1.0
I would like to join right_series on left_series by the indices, such that ...
1
vote
0
answers
33
views
How to merge rows with the same ID into one row by taking non-null values
I am working with a table in DolphinDB where multiple rows share the same id, and each row contains non-null values in different columns. My goal is to consolidate these rows into a single row for ...
0
votes
1
answer
33
views
Dataverse Dataflow is scrambling the order of returned rows in merge step
I have 2 queries in a Dataverse Dataflow ("Table 1" and "Table 2") that I combine in a new Append Query ("Append Table 1 & 2").
I then merge "Append Table 1 &...
1
vote
1
answer
107
views
Combining Two Dataframes Based on Multiple Conditions & Removing Rows that Don't Match
I need to combine two dataframes: one with detection data and another with the metadata for those detections.
The column names of the first dataframe, which is called rt_det are:
tag_id, power, ...
0
votes
2
answers
190
views
Why does using >= increase merge sort time complexity
I recently solved the Merge Sorted Array question on leetcode
Here is the part of the code I am having doubts on :
while (curr >= 0 && p1 >= 0 && p2 >= 0) {
// more TC if ...
4
votes
3
answers
106
views
Merging branch based off another branch that since has been merged (with squash and delete)
I am running into some weird merge conflict issues even though I am the only one working on the repository and have only made linear commits.
I have these branches:
main
feature-A (based off of main)
...
-7
votes
1
answer
174
views
How should I efficiently add all pairs in a key-value array to an object?
I have an object obj; and I then obtain an array arr of key-value pairs. Assuming that the key sets of obj and of arr are disjoint (i.e. no key appears in both) - how do I efficiently add all pairs in ...
0
votes
0
answers
29
views
How to map geoname ids to geoboundary shapeIDs?
I'm looking to map either wikidata ids or GeoName ids to geoBoundary shapeIDs for ADM1 and ADM2. I'm not sure if there is a straightforward way to do this.
For example, here is the GeoName entry for ...
6
votes
2
answers
200
views
How to drop duplicate values when merging dataframes
I have a DataFrame that I want to merge and drop only duplicates values based on column name and row. For example, key_x and key_y has the
same values in the same row in row 0,3,10,12,15.
My DataFrame
...
0
votes
2
answers
177
views
Error due to single-level dataframe merge with multi-level indexed dataframe
# Read lookup file which only contains 5 columns.
df_lookup = pd.read_excel(
os.path.join(path, 'lookup.xlsx'),
index_col=[0, 1, 2, 3, 4])
# sample df_lookup
# |A |B |C |D |E |
# |--|--|--|--|...
2
votes
1
answer
67
views
How to join a pivoted table with other tables
I’m working with the DolphinDB Python API to analyze financial data, but I can’t join a table transformed by pivotby() with another table directly. The error says TablePivotBy has no merge attribute. ...
4
votes
3
answers
98
views
Looking for a clean way to reword a few commits from before multiple merges were done without having to re-resolve conflicts
Note: I have already looked at the following answers and they don't seem to apply or work in the way I expect them to work:
Reword one commit prior to merge
Squashing old git commits that were before ...
-1
votes
1
answer
133
views
How can I merge two lists in Python while removing duplicates but preserving the original order? [duplicate]
I have two lists in Python:
list1 = [1, 2, 3, 4]
list2 = [3, 4, 5, 6]
I want to merge them into a single list such that:
No duplicates remain
The original order of elements is preserved
For the ...
0
votes
0
answers
51
views
join not merging data from both tables rapidminer
I am trying to join two outlier tests, by attribute id, the outliers discovered from LOF_Outliers and the outliers discovered from Distance_Outliers.
But only one of these two outliers is showing:
...
2
votes
1
answer
93
views
Why is `git merge-base` non-deterministic?
This is a follow-up question to my attempt at debugging a merge conflict. Instead of the complex case there, consider the following script that re-creates the "same" repo every time:
#!/bin/...