I am working with data frame in pandas
.
import pandas as pd
df = pd.read_csv('Amazon_Historical_StockPrice2.csv',parse_dates=['Date'], index_col='Date')
I need to choose only binary columns for preprocessing. I was trying to make a condition for the value of the columns, to choose columns with values less or equal 1 and greater or equal 0, but this condition doesn't exclude rational numbers in this interval. I would like to ask, is there any option to make it automatically as there are too many columns to make it by hands?
Thanks!