简体   繁体   中英

TypeError: 'str' object is not callable - boxplot

i am trying to make boxplot for my categorical variables and i have this error: TypeError: 'str' object is not callable

this is my code:pls see attached pic what should i do? thanks in advance

在此处输入图像描述

i tried to change the name of the variable but it didn't works

How are you importing the "plt" variable? Please share the whole code in situations like that.

But trying to solve your problem, the correct syntax to import "plt" should be:

import matplotlib.pyplot as plt

if you do this way, you can call

plt.title('trans and price')

with no errors.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM