Jun-12-2020, 07:47 AM
I am trying to check variable's data type is list or dataframe.
When I got type(df_c) is Out[155]: pandas.core.frame.DataFrame.
Checking it again by type(df_c) == 'pandas.core.frame.DataFrame', it showed False, not True. <-- I think it should print "True" rather than "False".
When I got type(df_c) is Out[155]: pandas.core.frame.DataFrame.
Checking it again by type(df_c) == 'pandas.core.frame.DataFrame', it showed False, not True. <-- I think it should print "True" rather than "False".
import pandas as pd c=[1,2,3] df_c=pd.DataFrame(c) type(df_c) Out[155]: pandas.core.frame.DataFrame type(df_c) == 'pandas.core.frame.DataFrame' Out[156]: False