There are multiple SO questions addressing some form of this topic, but they all seem terribly inefficient for removing only a single row from a csv file (usually they involve copying the entire file). If I have a csv formatted like so:

I have List<Person> where Person is as below.I'm trying to convert this to List<Person> to Map<String, Map<LocalDate,List<Person>>> where outer map's key is personId and inner map's key is date and I couldn't figure out how to achieve this. Thus far have tried something like below. Open to Java 8 solutions...

I have the following data:How can I convert it into something like this?itertools.chain with GroupBy.transform First, get rid of NaNs inside your column using a list comprehension (messy, I know, but this is the fastest way to do it).