Skip to content

Tag: python

Finding the headers for values in Json files

Hi I’ve got json data that looks something like this: I’m looking to convert this into lists that look something like this: So far I’ve been able to get all the names that I want using objectpath. But I’ve been unable to get the appropriate headers for each name as it appears to be nes…

reshape the array with specific form

I have an specific array which each rows has to array. I want to reshape it. But, I don’t know how to reshape it to a 2d array. Here is my array: Here is the desired output: Any help appreciated. Thanks I’ve tried to use the reshape. But, it does not solve. Answer It’s ragged, it’s not…

checking if message author has a certain role

I am making an automatic banning system with a discord bot. So once a message with a steam id is placed into the channel, it will run through an API and ban them (I’ve got this working) what I am looking for is to check if that user has a certain role or not. For this I am using a