I want to print the name of the Dataframe in a for a loop, but I dont get it right When I iterate over the datasets list I get the dataset. If I try with str(d) for example I get all the dataset as string. d.name() doesnt work either.
What can I do to print just the name of the Dataframe as a string?
Thanks in advance!
PD: I get this Error, "AttributeError: 'DataFrame' object has no attribute 'name'"
# Define lists
datasets = [train_data, test_data]
features = ['Age', 'Fare']
# Create function
fig, outliers = plt.subplots(figsize=(20,10), ncols=4)
row, col = 0, 0
for f in features:
for d in datasets:
sns.boxplot(x=d[f], orient='v', color=pal_titanic[3], ax=outliers[col])
outliers[col].set_title(f + 'in' + d)
col = col + 1