how to parse response immediately with asyncio.gather?

async def main(): uuids = await get_uuids_from_text_file() tasks = [] # create a task for each uuid # and add it to the list of tasks for uuid in uuids: task = asyncio.create_task(make_hypixel_request(uuid)) tasks.append(task) # wait for all the tasks to finish responses = await asyncio.gather(*tasks) # run the functions to process the data for … Read more

Creating new columns that contain the value of a specific index

I have tried multiple methods that get me to a point close to but not exactly where I want to be with the final output. I am trying to first create a few columns that contain a specific within the raw dataframe based on it’s position, afterwards I am trying to make a particular row the header row and skip all the rows that were above it.

I am building a simple AI assistant in python but the if statement is not working

I am building a simple AI assistant in python and so far everything has worked pretty well. The voice recognition and text to speech are working also fine. I wanted to make it work like, I am going to speak something and depending on the input it would answer some simple questions. But with the if statement I tried to make conditions depending on the input but it doesn’t get executed instead the else statement gets executed.

Converting a pdf to a csv with steps using python

So, as evident from the title, I want to convert a pdf to a csv so that I could use that data in my project. The problem is that the pdf formatting is not at all suitable for conversion to a csv file. For a human reader, the file makes complete sense but for a computer, it is extremely difficult to comprehend. It is difficult for me to explain here but I would encourage my fellow data scientists to help me find a solution for the same.