Skip to content
Advertisement

AttributeError: ‘tuple’ object has no attribute python-altair

I am trying to create a graph using altair in Python and I am getting the error code “AttributeError: ‘tuple’ object has no attribute ‘configure_title” I have tried but search for similar problems but it seems like there not many resources.

I have created a graph similar to what I want to accomplish but for some reason I am getting this problem.

This is my data

JavaScript

My Attempt:

JavaScript

Advertisement

Answer

This is the problematic line:

JavaScript

You need to remove the trailing comma, because in Python a trailing comma indicates a tuple. For example:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement