'pandas' has no attribute 'tslib'

df['tick'] = np.where(df.Length < .05, df.index, pd.tslib.NaT)

AttributeError: module 'pandas' has no attribute 'tslib' when I run this one it shows me that pandas tslib is not found how can I resolve it

Upvotes: 1

Views: 1372

Answers (1)

U13-Forward
U13-Forward

Reputation: 71560

You have to just use pd.NaT:

df['tick'] = np.where(df.Length < .05, df.index, pd.NaT)

As mentioned in this GitHub thread:

FutureWarning: pandas.tslib is deprecated and will be removed in a future version.

So it is remove now and it's inaccessible.

Upvotes: 1

Related Questions