Given df
is some dataframe
name_of_input = function(input) {
# Report back the name of input
cat(paste0(
deparse(substitute(input))
))
name_of_input(df)
This would return 'df' as a string. I can do this in R, but is it possible to do this with Python dataframes? I couldn't really find the right solution between unevaluated expressions and lambda functions. And it's not for global objects.