Category "python-3.x"

Printing values in new columns based on a condition from another column

I have a following dataframe: Time Tab User Description 27.10.2021 15:58:00 Tab Alpha [email protected] Tab Alpha of type PARTSTUDIO opened by User A 27.10.2021

how do I make a chloropleth map zip code to column in folium

I am trying to create a chloropleth by mapping zip codes to a cluster column on a data frame playing with stuff I've found on the folium site and tutorials, but

Writing BytesIO objects to in-memory Zipfile

I have a Flask-based webapp that I'm trying to do everything in-memory without touching the disk at all. I have created an in-memory Word doc (using python-docx

importing pyttsx3 in python3.8 and found an error

I downloaded pyttsx3 in command prompt I have a big error this the code: import pyttsx3 engine = pyttsx3.init() engine.say("I will speak this text") engine.runA

How to stop this running threading.Thread?

I found this non blocking code on stack overflow which is using threads to provide functionality of nonblocking setInterval function in JavaScript. But when I t

How to fix " TypeError: post_details() got an unexpected keyword argument 'slug' "

I'm creating my blog with django, and trying to make posts urls in slug way, after I created the models and called it in views it showed me this error: [TypeErr

Unable to return json values retrieved from MongoDB to HTML page in python flask

I'm able to retrieve required value from MongoDB individually and also able to print same values but unable to return all those values to HTML page. When I try

How to split a string in to list where the number of string in the list is defined?

So if I have a string: s = "this is just a sample string" I want to obtain a list of 3 characters each: l = ["thi", "s i", "s j", "ust", " a ", ...]

Error: Bad Gateway 502 when opening Google App Engine Python Domain

When I'm visiting my website (https://osm-messaging-platform.appspot.com), I get this error on the main webpage: 502 Bad Gateway. nginx/1.14.0 (Ubuntu). It'

Pip cannot find metadata file - EnvironmentError

Whenever I run pip to install the Flask packages like virtualenv in Ubuntu 16.04, I get this error: pip install virtualenv Requirement already satisfied: virt

Python Tweepy app will not run on new machine but runs on my laptop

Just like it says. The app runs like a charm on my MacBook but on my M1 MacMini, both machines run Python3.7.2, server I get this error. Traceback (most recent

Invocation timed out using Sagemaker to invoke endpoints with pretrained custom PyTorch model [Inference]

I have a pretrained model based on PyTorch (contextualized_topic_models) and have deployed it using AWS sagemaker script model. However, when I tried to invoke

How to call class method in robot framework?

I am getting error "No keyword with name 'addition' found." py file class A: def addition(self,a,b): print(a+b) obj=A() obj.addition(4,5) robot code

Python-3 Minecraft UUID to Username using the Requests library

I am wondering if it is possible to take a minecraft UUID and convert it into the users current username. I know how to get all of there previous usernames, but

Where is pandas.tools?

After installing pandas: idf:~/Documents/python/plot$ pip3 install pandas --user Collecting pandas Using cached https://files.pythonhosted.org/packages/f9/e1

Low pass filter with apply function - Help to solve

I have a question.how can I write the code. I want to create an image interface. The class filter should apply a low-pass filter to a given image and should be

Add yes/no confirmation in python 3.X [closed]

I have a function that allows a user the ability to add data via input. I would like to add a confirmation step that will allow them to answer

Print 1st word of each sentence in text using python

How to ignore text inside (). In below example I have to ignore printing directions) & Over right). Example: Text = "A paragraph is a self-contained unit of

Is there a way to display a pandas Dataframe in KivyMD?

Is there a way to display a pandas DataFrame in KivyMD? I tried putting the dataframe as a KivyMD DataTable but it doesn't work that way.

Python - How to get each item multiplied by the amount the user inputs? [closed]

I have this python3 code, it's a simple grocery list and the user can type the items he wants to buy and then the output is the total cost. Bu