Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

if df[col].unique()==2

df_dict = dict(zip([i for i in df.columns] , [pd.DataFrame(df[i].unique(), columns=[i]) for i in df.columns]))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
4+6 =