Configure the pivot table from the code

Hello everyone, I’m trying to configure my pivot table from the code, on the client side, and I can’t get it to work. I have data in the df, but this code does nothing.

Code Sample:

# Convert JSON string to list of dictionaries
items = json.loads(json_data)
  
# Set the items for the pivot table
self.pivot_1.items = items

# Configure your pivot table here
self.pivot_1.rows = ['sectors']

Any suggestions?

I’m not familiar with the third-party pivot table component, but for those who are, I’m sure they’ll need more clues.

Also consider communicating with the component’s authors directly, on the component’s github site, e.g., via its Issues or Discussion pages. These will be very specific to the component, and so very relevant. You might even find the problem (and perhaps a solution) already discussed there.

1 Like