Category "python-3.x"

inputing a list of tuples into a dictionary - python programming

I'm taking a MOOC on introduction to python programming, and have no idea how to proceed with one of the problem sets on dictionaries. Could you please provide

Write files to azure function

I have an azure function that take some files from storage account and write them inside the function , whene I run locally it works but whene I deply it shows

pyinstaller compatibility issue?

I use Ubuntu 22.04, pyinstaller 5.0.1, python 3.10.4 and wxPython 4.1.2a1. My software runs well. But I can't build the distribution package, even if I use "hid

How to convert datetime64[ns] to datetime.datetime

I have a data-fame whose index is of datetime64[ns] type Now I have another date-time object which is of datetime.datetime, based on this object I have to subse

What is the reason of this error I'm getting when using tkinter for a math app

Im making a program that will do most of my homework. Im trying to add some ui and it gives errors in my code. Please tell what's wrong. Make it easy enough for

How to display extra context and form fields at the same time on django template using class based view?

I am trying to display some extra context on the page, but when I adding get_context_data method it is displayed context but not a forms fields. This is because

how to get max values in dictionary?

text = 'orange strawberry barley gooseberry apple apricot barley currant orange melon pomegranate banana banana orange barley apricot plum grapefruit banana qui

Any sample cose for api integration with telegra,

I want to know any sample code for API integration like Spotify, or digistore24 kind of. please inform me if you have any

How to correctly implement refresh token with Dropbox Python SDK?

I'm trying to use the Dropbox Python SDK but was continually running into an issue of the short lived access token expiring. I think I finally found a solution

Have a list of length n. How to iterate over it and only break if the last name number, else: append the index of the first index

Original List = [1,2,3,5,10,9,8,9,10,11,7,8,7] Have a series of lists with RUN_LENGTH of 3 that I was able to splice using a Sliding window. After splicing I g

How to add role hierarchy in this command

so basically i want to add role hierarchy in this command i am using discord.py 2.0 i checked docs but i am not able to figure out how to exactly do it, pls hel

PJSUA call_make_call returned a result with an error set

i have a problem when use PJSUA module with the python3, when i make the call is always have a error: SystemError:<built-in function call_make_call> retur

Pythonanywhere MySQL-Connetion from outside

I tried to connect to my MySQL-Database from my Home-PC and got the error: 'Can't connect...' Inside this Server with Skript and Konsole I've got no problems, b

df.to_parquet() | Can I get .parq Bytes from Dataframe?

Goal: Get the Bytes of df.to_parquet() for upload. I attempted: import pandas as pd import io df = pd.DataFrame({'A': [1, 2, 3, 4, 5], 'B':

Sending Cisco commands from a text file using Netmiko fails. send_config_set works but send_config_from_file doesn't

I have been using this link as guide. https://pyneng.readthedocs.io/en/latest/book/18_ssh_telnet/netmiko.html#:~:text=Netmiko%20is%20a%20module%20that,pip%20ins

returning the highest value in the key : value pair in a dictionary [duplicate]

I'm in need of some assistance in this code problem from a MOOC on python programming that I'm taking. This is just for self-learning, and not

win43.client restrict combining many filters

I'm trying to read outlook emails via python, have code like below: import win32com.client import os from datetime import datetime, tim

facing issues in connecting to Teradata via python using teradatasql Module

Code: import teradatasql ExecutionContext = teradatasql.connect (host="xxxx", user="xxxx", password="xxx") def select(exec_context: ExecutionContext): try

How to change URL for beautifulsoup scraper every time the program runs (without doing it manually)?

I have the following code to scrape Reddit usernames: from bs4 import BeautifulSoup from requests import get from fake_useragent import UserAgent

Creating New Columns in Pandas based on subtracting two variables based on value from different indexes

I have a DateFrame df which contains Open High Low Close Volume and Date data for every minute for the past ten days. **open** high low **close** volume