Merging Datasets For the Win (and export)
If you find yourself with multiple datasets that you need to analyze or plot together, you will probably need to merge them. A merged dataset is handy because all of the data points line up with the same index or timestamp, which allows you to quickly compare variables, calculate correlations or create scatterplots.
Because OOI instruments are all provided as independent data streams, many with their own independent timestamps, this is an essential step when working with OOI datasets.
Luckily, with a few lines in Python, merging data is an easy task, especially for fixed-depth instruments where hourly time steps are all we need.
Today’s example notebook shows how we can merge 3 CTD instruments, each their own original dataset, into one combined dataset that can easily be exported to CSV or other formats.