I'm trying to combine data from multiple tables into one. (data files attached). Seems like a simple join(), or outerjoin(), but every path has run into issues.
Specifically what I want to do:
- Add rows from table 2 to table 1.
- Keep all rows in both tables (append rows)
- Where column names match, use that column
- Where columns are new, add column to table width
- Keep column names (outer join is renaming based on source table)
- Some table values are empty and should combine as empty values in existing and/or new columns as needed.
Tried so far:
- Join – Fails do to some empty values
- Join w/Replaced nan – fails do to some other key value error
- outerjoin() w/multiple configuration options – all failed.
- innerjoin90 – does not seem like what I want (throwing out data).
When done combining the attached tables there should be slight more columns than the first table, and rows should be the sum of rows in both tables.
This should be a common issue so assuming I am missing some simple solution…?
Using Matlab 2016b