导入时间戳时出现错误

时间:2021-03-19 15:40:55

标签: python pandas

NameError                                 Traceback (most recent call last)
<ipython-input-77-2e240bbfe4e9> in <module>
----> 1 df = pandas.TimeStamp.now()
      2 df
NameError: name 'pandas' is not defined

1 个答案:

答案 0 :(得分:0)

你有没有先尝试导入熊猫?

import pandas as pd
from pandas import Timestamp