您可以在此处使用参数
reduce=False和更多信息:
print (df.apply(lambda x: x.dtype, reduce=False))A int32Bfloat64C objectD datetime64[ns]dtype: object
在较新版本的熊猫中可以使用:
print (df.apply(lambda x: x.dtype, result_type='expand'))

您可以在此处使用参数
reduce=False和更多信息:
print (df.apply(lambda x: x.dtype, reduce=False))A int32Bfloat64C objectD datetime64[ns]dtype: object
在较新版本的熊猫中可以使用:
print (df.apply(lambda x: x.dtype, result_type='expand'))