this is a sample diabetics dataset
I want to get only the 2 mentioned columns as the output but i am not sure about the code for that
df.get("gender", "heart_disease")
I tried this and the code is working but I am only getting the output of gender want only 10 sample outputs. how do i get that?
>Solution :
First, subset the pandas data frame using the df[list of columns] notation then sample
df[['gender', 'heart_disease']].sample(10)