I have a dataframe column names which are in form of string I would like to convert it into tuple, which shows the data inside of those column names. I have used "eval" but since its dangerous to use is there any other way to convert?
input: dt = "df['cars'],df['bikes']"
output: dt = (df['cars'],df['bikes'])
print(dt)? You cannot get(df['cars'],df['bikes'])if this is what you want. It will print the entire column instead