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

What is JSONEncoder c_make_encoder?

I LOVE the python module json, and I love json.dumps(); however, I hate the fact that you need to pass additional arguments to it if you want to extend its behaviour.I am strong believer that classes...

View Article


Image may be NSFW.
Clik here to view.

Inner Join Database Table with Excel file by query in python

I need to perform an inner join between a table in Amazon Redshift and an Excel table. The database table is quite large, and I only need to extract the IDs that are in Excel file, which contains a...

View Article


Can you find the errors in this python code?

def make_list(number): names = [] for item in number: names.append(input("Enter your name with a capital letter.")) print(names) number = int(input("How many names need to be entered?")) names =...

View Article

python: change ipv6 ip address to ipv4 ip address

Have two docs and need to match them via ipaddress. One file contains only ipv4 ipaddress and the other file contains a mixture of ipv4 and ipv6.Is there a way to convert ipv6 to ipv4?Took a look of...

View Article

Anki CSV Importer not working - KeyError: 'Front'

I am trying to use the Anki CSV Importer to import a CSV file I have into an Anki deck.My CSV file has 2 columns (Answer, Question) and, as of right now, 2628 rows (whose number will grow with time),...

View Article


when running a script in python it asks for user input multiple times even...

so here is the thing i havei have two script script1.py and script2.pyscript1.py main idea is two gather the user's inputs via the input function, assining it to variables and calling the execution of...

View Article

pd.read_excel / ExcelWriter raise BadZipFile: File is not a zip file

I am trying to concatenate a series of excel files with Pandas. I created a for loop to read in all file for a provided directory and I specified the sheet name alongside the columns I wanted to read...

View Article

ValueError: setting an array element with a sequence in Python numpy array

I'm currently working on a project to build an AI chatbot using Python, and I'm encountering an error that I can't seem to resolve. When attempting to convert my training data into a numpy array, I'm...

View Article


Getting Cannot mask with non-boolean array containing NA / NaN values... But...

I had this working, and now I changed "something" and it doesn't work any more. I have a table in Excel that I'm reading into a df. That works as expected. I read it in, and then I filter it so I only...

View Article


How can I fix this strange error: "RuntimeError: CUDA error: out of memory"?

I successfully trained the network but got this error during validation:RuntimeError: CUDA error: out of memory

View Article

Airflow HiveOperator Result Set

I'm new to both Airflow and Python, and I'm trying to configure a scheduled report. The report needs to pull data from Hive and email the results.My code thus far:from datetime import datetime,...

View Article

How to read a Parquet file into Pandas DataFrame?

How to read a modestly sized Parquet data-set into an in-memory Pandas DataFrame without setting up a cluster computing infrastructure such as Hadoop or Spark? This is only a moderate amount of data...

View Article

How to avoid "CUDA out of memory" in PyTorch

I think it's a pretty common message for PyTorch users with low GPU memory:RuntimeError: CUDA out of memory. Tried to allocate X MiB (GPU X; X GiB total capacity; X GiB already allocated; X MiB free; X...

View Article


i have a print statement to print 16 lines (for loop) in hadoop mapper but...

it is a matric multiplication map reduce but i am not getting a sucessful output in reduceas in the image the python porgram works fine but when in streaming the output recvieved is not what i thought...

View Article

I need to create a backend project project within a month. So someone just a...

I learned SQL and I know basics in js, html/css, python,c#I need to learn and create a backend project immediately within a month.So someone just me idea, with what programming language to learn...

View Article


The 'flag' appears only when the first turtle touches the finish line

[[[enter image description here](https://i.stack.imgur.com/694bC.png)](https://i.stack.imgur.com/1jiZh.png)](https://i.stack.imgur.com/OG6D7.png)The 'flag' which called 'win' appears only when the...

View Article

Exception: Not found: 'python/cv2/py.typed' ERROR: Failed building wheel for...

I am following the env setup in CenterPose repo. However, opencv-python doesn't get installed.(CenterPose) mona@ada:/data/CenterPose/data$ pip install opencv-pythonI get this error: -- Installing:...

View Article


Enviroment variables in pyenv-virtualenv

I have created a virtual environment with pyenv virtualenv 3.5.9 projectname for developing a django project.How can I set environment variables for my code to use?I tried to add the environment...

View Article

Ansible error: AttributeError: module 'platform' has no attribute 'dist'

I want to add group in remote machine via ansible playbook and i get error.This is my code from playbook:- name: Ensure group for deploy_user exists become: yes group: name: "{{ deploy_user }}" state:...

View Article

python flask application creating user in different directory instead of the...

I am trying to write an application with flask to automate HRMS process for user creation in active directory. I am using my office laptop which is joined to domain.While I am starting the debug, the...

View Article
Browsing all 13921 articles
Browse latest View live


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