Questions tagged [merging-data]

173 questions
2
votes
3 answers

Any efficient BlockingQueue implementations that allow combining of entries?

Are there any efficient (without synchronize everything) implementations of java.util.concurrent.BlockingQueue that allow combining of entries? By combining I mean to merge incoming item with existing "equal" entry on the queue (if there is one),…
Dusan
  • 115
  • 1
  • 7
1
vote
1 answer

Reading text and numeric data from .dat file in matlab

Here i am sharing one of my data which are in .dat file. I have 16162 different files. I merged all into one file and want to read it in matlab and need to extract three parameter's values from a single file and arrange them in either row wise or…
mmenvo
  • 67
  • 4
  • 13
1
vote
1 answer

Merging Dataset in R returns unexpected NA values

For this week tidytuesday challenge, I was trying to inspect the drought data. I wanted to make a spatial map to see the US counties' drought level. To this end, I tried to merge geospatial data from maps package with the existing data. Here is my…
mzkrc
  • 219
  • 2
  • 7
1
vote
1 answer

Merge JSON data inside dynamic PDF templates

My problem is rather simple: I need a tool to merge some medium complex JSON input data inside a template PDF. Then based on the data: Some sections of the template could be replicated. Some sections may be deleted and the gap created should…
OxPenguin
  • 93
  • 8
1
vote
2 answers

How to match corresponding values to part of string (before and after space)?

I have two dataframes, and want to add values from the 2nd one to the 1st one according to string values, but use partial string matching if there is a space df1: cat small dog apple df2: cat 24 small 5 dog 400 apple 83 pear 55 I normally use…
Agata
  • 343
  • 3
  • 13
1
vote
1 answer

Collapse overlapping coloums in pandas dataframe

I have a data frame that looks like this: >>> df = pd.DataFrame({'P1':['ARF5','NaN','NaN'],'P2':['NaN','M6PR','NaN'],'P3':['NaN','NaN','NDUFAF7']}) >>> df P1 P2 P3 0 ARF5 NaN NaN 1 NaN M6PR NaN 2 NaN NaN NDUFAF7 I…
liscruk
  • 13
  • 3
1
vote
1 answer

Why would a merged file be one less line than its input files?

I'm doing some multithread webscraping and write 100 lines per thread into 100 files. I check to make sure every file has 100 lines then I merge. Then I check to make sure the merged file has 10000 lines. Only this time, the merged file seems to be…
metzkorn
  • 335
  • 2
  • 8
1
vote
2 answers

Group two dfs based on dates that closely match

These are subsets of two…
user3508884
  • 75
  • 1
  • 1
  • 8
1
vote
2 answers

Add rows from one array as child items to an array of parent rows

I'm facing some trouble while trying to manipulate two arrays with some similarities. The first array has this structure: $modules = [ [ "id_modulo" => "114", "nome_modulo" => "1. Acessos" ], [ "id_modulo" =>…
jvbs
  • 417
  • 2
  • 11
  • 27
1
vote
0 answers

Python - Merge 2 similar pandas Dataframe with condition

I have 2 Df with an identical structure to be merged with a condition. I need to have all the id raw but not duplicated and when there is a same id I need to choice the one from the dataframe with val==1 or just the row from the df1 if df1.val ==…
Emiliano
  • 46
  • 4
1
vote
1 answer

Unable to update pandas dataframes with df.merge in a loop - what am missing?

I am trying to update a set of pandas dataframes with results of some calculations stored in a dataframe. I created the following loop to do this. This seems to work within the loop, but I find that the original dataframe is not updated after the…
1
vote
1 answer

Could not merge multiple Jsonb rows into a single row

Need to merge all the rows of my single jsonb column. For example: my jsonb column has rows as the below one. My input data is (2 rows): {"room": ["101"],"equipments": ["thermometer"]} {"room": ["101","102"], "equipments": ["stethescope"]} upon…
1
vote
1 answer

Data Merging Pandas

I was running some pcmark tests in different machines. In the end i want to consolidate the machine results. I have modified the end result to display. I have tried different forms of merge using pandas but i could not get expected result but this…
anjali rai
  • 185
  • 1
  • 1
  • 14
1
vote
2 answers

How to merge different matlab mat files holding metadata to use in python?

I've got 1,000+ very long matlab vectors (varying lengths ~ 10^8 samples) representing data from different patients and sources. I wish to compactly organize them in one file for a later convenient access in python. I want each sample to somehow…
Shlomi Shmuel
  • 21
  • 1
  • 7
1
vote
1 answer

Merging filled row cells with ignoring empty cells in Python

After some data preprocessing, I am stuck with merging the datasets. What I would like to do is to merge all dates under the same column as following in a row order according to same batch number. Normally it was stacked data, then I have unstacked…
1 2
3
11 12