You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/visual-programming/source/widgets/data/mergedata.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,9 @@ Merges two datasets, based on values of selected attributes.
14
14
15
15
The **Merge Data** widget is used to horizontally merge two datasets, based on the values of selected attributes (columns). In the input, two datasets are required, data and extra data. Rows from the two data sets are matched by the values of pairs of attributes, chosen by the user. The widget produces one output. It corresponds to the instances from the input data to which attributes (columns) from input extra data are appended.
16
16
17
-
If the selected attribute pair does not contain unique values (in other words, the attributes have duplicate values), the widget will give a warning. Instead, one can match by more than one attribute. Click on the plus icon to add the attribute to merge on. The final result has to be a unique combination for each individual row.
17
+
To match by a combination of features click on the plus icon to add the features to merge on.
18
+
19
+
Depending upon the merge types, selected features may be required to have unique values (that is, no duplicates) in the data. When merging by multiple features, this pertains to a combinations of their values.
18
20
19
21

20
22
@@ -39,13 +41,17 @@ For example, the first table may contain city names and the second would be a li
39
41
40
42
In our example, the first Data input contained 6 cities, but the Extra Data did not provide Lat and Lon values for Bratislava, so the fields will be empty.
41
43
44
+
For this type of merge, the values on the left (e.g. cities) may repeat (e.g. the same city appear multiple times), while the *used* value on the right must not. For example, let the right-hand table contain multiple Springfields. If Springfield does not appear on the left, the widget will show a warning but still merge the data. If Springfield does appear on the left as well, the widget will show an error. This can be resolved if the both table also include the data on the state (e.g. Illinois, Missouri, Oregon, Ohio) and this feature is added to the combination being matched.
45
+
42
46

43
47
44
48
#####Find matching pairs of rows (inner join)
45
49
46
50
Only those rows that are matched will be present on the output, with the Extra Data columns appended. Rows without matches are removed.
47
51
48
-
In our example, Bratislava from the Data input did not have Lat and Lon values, while Belgrade from the Extra Data could not be found in the City column we were merging on. Hence both instances are remove - only the intersection of instances is sent to the output.
52
+
In our example, Bratislava from the Data input did not have Lat and Lon values, while Belgrade from the Extra Data could not be found in the City column we were merging on. Hence both instances are removed - only the intersection of instances is sent to the output.
53
+
54
+
For this type of merge, combinations of features on the left and on the right must be unique.
49
55
50
56

51
57
@@ -55,6 +61,8 @@ The rows from both the Data and the Extra Data will be present on the output. Wh
55
61
56
62
In our example, both Bratislava and Belgrade are now present. Bratislava will have missing Lat and Lon values, while Belgrade will have a missing Population value.
57
63
64
+
For this type of merge, combinations of features on the left and on the right must be unique.
0 commit comments