25,225 questions
-1
votes
0
answers
56
views
DataTable.Merge not working after changing column data types [closed]
I am trying to use the DataTable.Merge method and running into a situation where it does not work.
I import two Excel spreadsheets into two DataTables, but I also change two columns in each imported ...
-1
votes
1
answer
37
views
Conditionally merge a map of objects in Terraform
I have a map of objects, and I want to filter the objects into a new map based on another variable. I think this should be fairly simple, but I get an error when using merge (which I assumed would be ...
1
vote
1
answer
134
views
How to duplicate columns with a prefix/suffix when flattening a DataFrameGroupBy
I've been working on a project to learn Python and play around with machine learning that uses data from the NHL's public API. I've been able to teach myself via documentation and Google searches so ...
3
votes
1
answer
133
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 ...
0
votes
0
answers
46
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
40
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
2
answers
136
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
283
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
127
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
191
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
35
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
206
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
184
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
70
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
107
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 ...