def diagramm_maker(column): typical_flats_one_room.plot(x=column, y='last_price_tho', kind='scatter', alpha=0.4) typical_flats_one_room[column].corr(typical_flats_one_room['last_price_tho']) diagramm_maker('total_area')