I have a very large data frame containing location data from 8 different ships. I want to split this data frame into 8 smaller data frames corresponding to the 8 ships that are represented in the data. I want these dataframes to have the same name as the ship that is represented in the data frame.
Asked
Active
Viewed 181 times
0
-
You can either just `groupby` on the ship names, or just make a list of the 8 chip names and construct a dict using the ship names as keys and the subset dfs as the dict values. Personally I'd avoid making multiple dfs unless there is a performance reason – EdChum Apr 10 '17 at 12:27
-
Depending on usage there might be a privacy reason too for separation. Assumed each ship has the option to see data from other ships, that might be undesired even by some laws perhaps. – David Apr 10 '17 at 12:33