Category "python-3.x"

Format Changing Problem of Number Input in streamlit

The program offers the number format as Default in a.b format (like 1.2) but I want to show as a:b format (like 1:2) How can I change this? I tried below but i

Python calculate increment rows till a condition

How to obtain the below result. Sample Data with Output Time To default is the column which is to be calculated. We need to get the increment number as Time to

Pandas Group by index Hour and keeping observation for each hour

I have a pandas dataframe containing one column and a datetime index, i need to group the data by hour and keep each obsevation (record) for each of the grouped

How do I calculate the global efficiency of graph in igraph (python)?

I am trying to calculate the global efficiency of a graph in igraph but I am not sure if I using the module correctly. I think there is a solution that might ma

ParseError: Error tokenizing data. C error: Buffer overflow caught - possible malformed input file. (read_csv)

I cannot use read_csv method of pandas properly on kaggle. Error that I get is: ParseError: Error tokenizing data. C error: Buffer overflow caught - possible ma

Error Setting Python Plugin on Eclipse: Using an Unsupported version (Python and JPython)

I was adding a Python plugin to Eclipse. I was able to successfully add PyDev. However, when I was adding manually the interpreter I got the following error: -

Odoo : How to clear a many2many field when a many2one field change?

Im new to odoo. Im using odoo 13 and I have a many2one field and a many2many field with domain on the many2one field. What I need is that if the user changes th

Getting error Bad File Descriptor while installing pip

whenever i try to install pip i always get this error. pls help . i dont know how to fix this i tried doing it using the default python executable using the mod

Implement constrained optimization problem in Mystic

Is it possible to implement the following problem in mystic? The problem minimizes a sum of squares between two (10000 by 40) matrices: Σ(X-A)^2 where X i

Python program works only from pycharm, not somewhere else

The script works fine when I run it in pycharm, but if I run it from somewhere else it just doesn't work. When I run it via cmd it gives me this error: Tracebac

How to convert input arguments to program as json in python

Here is my code import json import sys def main(): payloads=sys.argv[2] payloads=payloads.replace(",",",\"") payloads=payloads.replace(":","\":")

How to add a word in the list of Alphabetical order in python programming language without repeating letters from the alphabet?

How to add a word in the list of Alphabetical order in python programming language without repeating letters from the alphabet? Here's my code: key=input("Enter

how to apply ModelCheckpoint in a custom training loop for tensorflow 2.0?

we can set tf.keras.callbacks.ModelCheckpoint(), then pass a callbacks argument to fit() method to save the best modelcheckpoint, but how to make the same thing

Unable to exit tkinter app when using "wait_variable()"

I have a python code that includes tkinter window and other running tasks. I've been trying to bind "WM_DELETE_WINDOW" event to a function that exits my python

Encounter an Error in Python for Variational Autoencoder

I encounter an error while implementing Variational Autoencoders, the code I actually get from coursera course but it didn't run. the whole code run smoothly,

Calling a REST API with Api Id and key using Python

I am trying to send a request to get a token to an API. curl -X POST "https://base_url/token" -H "accept: application/json" -H "Content-Type: applicatio

Why static files are not loading? | Django

I'm trying to load static files, but it's showing following error: GET http://127.0.0.1:8000/static/css/user/style.css net::ERR_ABORTED 404 (Not Found) - home:2

Improving exception handling of Netmiko script to SSH into Cicso devices

I'm trying to improve the exception handling of a netmiko script that successfully runs commands on Cisco devices listed in a text file and saves a list of the

How to call same start_urls for different search codes in scrapy

Apologies in advance, if my question sounds pretty lame. As per my crawling requirements, I need to hit 1 url and search for 1 item at a time in the search box

File not found error in Jupyter lab using python

I using online jupyterlab which can be accessed through this link below if not then use the second link This is the second link So the problem is i have uploade