The TimedeltaIndex.notna() method in the pandas library is used to detect non-missing values in a TimedeltaIndex. It returns a Boolean array of the same length as the original TimedeltaIndex, where True indicates a non-missing value and False indicates a missing value (i.e., NaT in the context of time deltas).
Here's a basic overview of its usage:
pandas.TimedeltaIndex.notna()
Let's see a quick example to understand how TimedeltaIndex.notna() works:
import pandas as pd # Create a TimedeltaIndex with missing values (NaT) tdi = pd.TimedeltaIndex(['1 days', 'NaT', '3 days', 'NaT']) # Detect non-missing values result = tdi.notna() print(result)
Output:
array([ True, False, True, False])
In this example, the TimedeltaIndex tdi has two missing values (NaT). The notna() method returns an array where the non-missing values are marked as True and the missing values as False.
fastlane celery http-proxy erb entitymanager angular-service-worker nexus3 html-encode ssis renaming