Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Best way to check amount of data in a dataset?

There have been a couple of occasions where I've been working in the Research environment and I go to test a new factor/customfactor/etc. when I find that a dataset I was attempting to use seems basically empty. I understand why some of these fields might have little to no data,but I'd like to know what the best way to weed these out might be before I proceed using them? It's only after I've run a pipeline containing the dataset factor that I can then screen ~EXAMPLEFACTOR.isnan() and find out I've been thinking too much about this empty dataset.

3 responses

Specifically in this case I was looking to use the "cost of debt" data in the factset fundamentals dataset

Hi, maybe you are looking for

 df.count(level=0)  

Hi William, thanks that looks like it may be what I need. I'll test it out.