I have a pivot table from which I want to calculate the pairwise distance matrix between each day. As my dataset contains NaN values when I am using sklearn pairwise distances it yields at me.
I like to if there is anyway to overcome this?
The pivot table X is like :
time 04:45:00 05:00:00 05:15:00
date
01-01 61 NaN 44
01-02 23 70 NaN
from sklearn.metrics.pairwise import pairwise_distances
pairwise_distances(X)
I face the following error:
ValueError: Input conains NaN, infinity or a value too large for dtype('float64')