Quantcast
Channel: Active questions tagged python - Stack Overflow
Browsing all 13921 articles
Browse latest View live

Sink is not written into delta table in Spark structured streaming

I want to create a streaming job, that reads messages from a folder within TXT files, does the parsing, some processing, and appends the result into one of 3 possible delta tables depending on the...

View Article


Python Multi-threading - How to kill all child threads when one of them raise...

Depending on the needs of the program, I used multi-threads within a sub-thread for parallel tasking. In this "deep" multi-threading, potential problems such as timeouts and failures may be...

View Article


Using ttkbootstrap in Tkinter - How to customize themes?

I'm working on a Tkinter-based GUI in Python and came across the ttkbootstrap library, which seems to offer additional theming capabilities for ttk widgets. However, I'm having trouble customizing...

View Article

How to change cell value alignment in ipysheet sheet from a pandas dataframe

how can i change the alignment of an entire column or an individual cell in ipysheet ?I tried :for k,c in enumerate(sheet1.cells): c.style['textAlign']='left'but it doesnt work (might be deprecated).I...

View Article

Image may be NSFW.
Clik here to view.

422 Unprocessible Entity error when sending List of Form data through Swagger...

I created an API for transcoding video files like adaptive bit rate of youtube. I used FastAPI. Currently, I am trying to set resolution values for each file. But whenever I am adding multiple...

View Article


Python Program to Analyze and Count Unique Data Types in Nested JSON Structures

I need to write a Python program that reads a JSON file and traverses through nested data structures, counting occurrences of all unique data types. The program should provide the user with a...

View Article

No module named 'pydantic_core._pydantic_core' in AWS Lambda though library...

AWS lambda deployment of FastAPI gives the following error:[ERROR] Runtime.ImportModuleError: Unable to import module 'users_crud': No module named 'pydantic_core._pydantic_core'Traceback (most recent...

View Article

hackerrank average function in python

hi guys i tried runnig this code bit it keeps failing at most of the test i don't what the problem is!!#!/bin/pythonimport mathimport osimport randomimport reimport sys# write your code heredef...

View Article


Installing python kernel in a Conda environment

I have just started using jupyter notebook for my development process. I started by creating a new python environment:$ conda create -n testenvThen I activate it:$ source activate testenvAnd install...

View Article


Selenium get(link) is not working properly

So I have written a very basic line of code that uses selenium to open a webpage.from time import sleepfrom selenium import webdriverfrom selenium.webdriver.chrome.options import Optionsfrom...

View Article

python async-await blocking understanding

I'm new to async-await and this has been confusing me.import asyncio# Step 1: Define an asynchronous functionasync def print_message(message, delay): await asyncio.sleep(delay) print(message)# Step 2:...

View Article

Delete 2 column headers and shift the whole column row to left in dataframe

Delete 2 column headers and shift the whole column row to left in dataframe. Below is my dataframe. trash1 trash2 name age0 john 54 1 mike 34 2 suz 56 3 tin 78 4 yan 31 i need the final df as below...

View Article

Image may be NSFW.
Clik here to view.

In Django how to compare two texts and print a message about correctness or...

I'm new to Django. In Django i would like to compare two texts, between frontend and backend, and receive a message if they are the same or different. In reality these two texts are two short HTML...

View Article


Could not find a version that satisfies the requirement tensorflow

I installed the latest version of Python (3.6.4 64-bit) and the latest version of PyCharm (2017.3.3 64-bit). Then I installed some modules in PyCharm (Numpy, Pandas, etc), but when I tried installing...

View Article

Script does not save output to correct path while using auto py to exe

my program uses netsh to save wifi profile information on a txt file in a directory that is named as the system time of the moment of running the programso lets say you have signed into three wifi...

View Article


SQLAlchemy ER diagram in python 3

Does anyone know a way to make an ER diagram from SQLAlchemy models in python 3. I found sqlalchemy_schemadisplay, which is python 2 because of pydot and ERAlchemy which is also python 2 only.

View Article

How to make a histogram based on the second column of a large matrix and then...

The matrix is like 4000 columns x 1e8 lines. Now I need to divide the 1e8 lines into 1000 bins based on the 2nd column and sum the lines in every bin. Finally, I would get 4000 columns x 1000...

View Article


Environment variable interpolation does not work with @_here_

I'm setting up hydra config for my python project and struggling a bit to get variable interpolation working in the following context.Directory structure├── config/│├── config.yaml│├──...

View Article

How to convert "Shiny for Python" to ".exe" file using pyinstaller

I tried to convert python file(using Shiny for python) to exe file using pyinstaller.We proceeded with the process below.(1) create "main.py" python fileimport osimport sysfrom shiny._main import...

View Article

Plotting trends maps in Python

I have NetCDF data which consists of dimensions as latitude, longitude, and time (as year), and one variable as TOMSEPL3_008_Aeroso. The time dimension is from 2001-2020. I am trying to perform a...

View Article
Browsing all 13921 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>