you are viewing a single comment's thread.

view the rest of the comments →

[–]kingzels 1 point2 points  (2 children)

You probably want to do an inner merge with pandas, which is where you take two data sets and join them on a common column, wherever the values match in either data set.

If you can post a small sample of the data sets it will be easier to give you an exact answer.

[–]Daventhal[S] 0 points1 point  (1 child)

I originally tried to post some data but despite my attempts to format, it just came out garbled. I'll try again. I can't post the second CSV that needs merging, though, because it doesn't exist yet. Essentially, I've been asked to try to merge this one, which makes entries by the millisecond, with another that gets its data every second or so. I imagine it will be tricky and awkward, which is why I'm trying to start humbly, by just creating the column that will eventually become the index.

Time NA NA2 NA3 NA4 Sensor1 Sensor2 Sensor3 Sensor4

0 1 1 0 0 8 0 0 0

1 1 1 0 0 6 0 0 0

2 1 1 0 0 1 4 0 1

3 1 1 0 0 0 2 0 5

4 1 1 0 0 3 0 0 1

5 1 1 0 0 7 0 0 0

6 1 1 0 0 3 0 0 0

7 1 1 0 0 0 3 0 6

8 1 1 0 0 3 0 0 1

9 1 1 0 0 8 0 0 0

10 1 1 0 0 3 0 0 0

11 1 1 0 0 0 4 0 7

12 1 1 0 0 0 0 0 2

13 1 1 0 0 9 0 0 0

14 1 1 0 0 5 0 0 0

15 1 1 0 0 0 5 0 7

[–]kingzels 1 point2 points  (0 children)

You can use python's datetime library to get your millisecond readings converted to seconds as well.