I found a question very similar to this but it doesn’t work for my situation.
I have an existing dataframe. I’m using groupby on it, however, the function which looks at the group is an all or nothing evalution. That is, if the group “passes” the whole group is returned otherwise and empty row should be returned.
What this means, is that if I have a dataframe
x=DataFrame([,], [:a, :b])
what I want to do is to return an empty row of the same DataFrame type of x. This works, but requires me to explicitly construct the empty array, which means the code breaks the day my dataframe changes.
Since i have an existing DF it seems to me like there must be someway to create an empty row of the particular DataFrame type, right ? Having no luck finding it. ALL of the examples I’ve seen require “manual” intervention of some sort.