Most voted questions in Python

0 votes
0 answers

What are the differences between numpy arrays and matrices? Which one should I use?

What are each's advantages and drawbacks? I've noticed ...READ MORE

Aug 8, 2022 in Python by krishna
• 2,820 points
841 views
0 votes
0 answers
0 votes
0 answers

Flattening a list of NumPy arrays?

I have data in a list type ...READ MORE

Aug 5, 2022 in Python by krishna
• 2,820 points
1,484 views
0 votes
0 answers

Sorting arrays in NumPy by column

How can I sort a numpy array ...READ MORE

Aug 2, 2022 in Python by krishna
• 2,820 points
811 views
0 votes
0 answers

Java : Sort integer array without using Arrays.sort()

I have this assignment- Write java program ...READ MORE

Aug 2, 2022 in Python by krishna
• 2,820 points
2,646 views
0 votes
0 answers

matrix multiplication of arrays in python

I am having trouble finding a solution ...READ MORE

Aug 2, 2022 in Python by krishna
• 2,820 points
1,327 views
0 votes
0 answers

Combined mean and standard deviation from a collection of NumPy arrays of different shapes

Consider that I have a numpy array ...READ MORE

Aug 2, 2022 in Python by krishna
• 2,820 points
1,226 views
0 votes
0 answers

Concatenate two numpy arrays in the 4th dimension

I got two numpy arrays in three ...READ MORE

Aug 1, 2022 in Python by krishna
• 2,820 points
735 views
0 votes
0 answers

Python numpy array of numpy arrays

I have a requirement. I need to ...READ MORE

Aug 1, 2022 in Python by krishna
• 2,820 points
881 views
0 votes
0 answers

actually i am finding the bugs in the code and unable to run the code in python

none = none a = none + 5 ...READ MORE

Jul 19, 2022 in Python by anonymous

edited Mar 4 143 views
0 votes
0 answers

why is my syntax error? expected an indented block

class LinearModel():     def __init__(self, features, target):  self.X ...READ MORE

Jul 12, 2022 in Python by Abdulloh

edited Mar 4 146 views
0 votes
0 answers

ImportError: cannot import name api ,when we try to export swagger specification in python restplus

from flask import json from myapp import api urlvars ...READ MORE

Jul 8, 2022 in Python by Rakshitha

edited Mar 4 150 views
0 votes
0 answers

Filter data in django before expired date

I want to show and filter  data ...READ MORE

Jul 5, 2022 in Python by Ide

edited Mar 4 138 views
0 votes
0 answers

I executed this code. But its showing me error. Could anyone fix it?

READ MORE

Jun 25, 2022 in Python by anonymous

edited Mar 4 131 views
0 votes
0 answers

lmList, bbox = detector.findPosition(img) ValueError: not enough values to unpack (expected 2, got 0)

can anyone please help me, tried those ...READ MORE

Jun 22, 2022 in Python by Webinar

edited Mar 4 135 views
0 votes
0 answers

How to highlight cell value in dataframe that exceeds mean of its column

I have a df with where I ...READ MORE

Jun 10, 2022 in Python by Pavan

edited Mar 4 139 views
0 votes
0 answers

IndentationError: expected an indented block

this is my code  stemming = PorterStemmer() corpus = ...READ MORE

Jun 8, 2022 in Python by anonymous

edited Mar 4 140 views
0 votes
0 answers

Module 'numpy.core' has no attribute 'numerictypes' (Error)

from imageai.Detection import ObjectDetection detector = ObjectDetection() detector.setModelTypeAsTinyYOLOv3() detector.setModelPath("BrainTumor10EpochsCategorical.h5") detector.loadModel() detection = ...READ MORE

Jun 3, 2022 in Python by Abdullah Celal

edited Mar 4 149 views
0 votes
0 answers

How to prettyprint a JSON file?

May 27, 2022 in Python by Kichu
• 19,040 points
814 views
0 votes
0 answers

pip3: command not found but python3-pip is already installed

I am not able to use  pip3 ...READ MORE

May 27, 2022 in Python by Kichu
• 19,040 points
4,220 views
0 votes
0 answers

Extract a page from a pdf as a jpeg

How can I  save a certain page ...READ MORE

May 26, 2022 in Python by Kichu
• 19,040 points
763 views
0 votes
0 answers

How do I access environment variables in Python?

May 26, 2022 in Python by Kichu
• 19,040 points
1,089 views
0 votes
0 answers

Python - TypeError: Object of type 'int64' is not JSON serializable

My data frame has store names and ...READ MORE

May 26, 2022 in Python by Kichu
• 19,040 points
3,047 views
0 votes
0 answers

Find the minimum strength someone must have in the beginning so that he can cross N cells (Interview question)

Problem Statement: Mustafa wants to cross a dungeon. ...READ MORE

May 26, 2022 in Python by Kichu
• 19,040 points
2,657 views
0 votes
0 answers

how to merge two data frames based on particular column in pandas python?

I want to  merge two data frames: df1 company,standard tata,A1 cts,A2 dell,A3 df2 company,return tata,71 dell,78 cts,27 hcl,23 I ...READ MORE

May 26, 2022 in Python by Kichu
• 19,040 points
894 views
0 votes
0 answers

memory error in python

I am working on a  program that ...READ MORE

May 26, 2022 in Python by Kichu
• 19,040 points
959 views
0 votes
0 answers

How can I install XGBoost package in python on Windows

I am using windows 64bit os and ...READ MORE

May 26, 2022 in Python by Kichu
• 19,040 points
809 views
0 votes
0 answers

How do I do a case-insensitive string comparison?

How can I do case-insensitive string comparison ...READ MORE

May 26, 2022 in Python by Kichu
• 19,040 points
704 views
0 votes
0 answers

ModuleNotFoundError: No module named 'speechemotionrecognition' How to install speechemotionrecognition in python

this is my code:       import pyAudioAnalysis, speechemotionrecognition       from speechemotionrecognition.dnn ...READ MORE

May 25, 2022 in Python by zhang

edited Mar 4 215 views
0 votes
0 answers

How to input matrix (2D list) in Python?

I am working on a code that ...READ MORE

May 24, 2022 in Python by Kichu
• 19,040 points
1,362 views
0 votes
0 answers

dlib installation on Windows 10

 I have the python app running great ...READ MORE

May 24, 2022 in Python by Kichu
• 19,040 points
1,542 views
0 votes
0 answers

How do I convert a datetime to date?

How do I convert a datetime.datetime object ...READ MORE

May 24, 2022 in Python by Kichu
• 19,040 points
904 views
0 votes
0 answers

Why am I getting a FileNotFoundError?

I am working on a program that ...READ MORE

May 24, 2022 in Python by Kichu
• 19,040 points
692 views
0 votes
0 answers

TypeError: 'type' object is not subscriptable when indexing in to a dictionary

I use dict to shorten things as ...READ MORE

May 24, 2022 in Python by Kichu
• 19,040 points
1,725 views
0 votes
0 answers

iloc giving 'IndexError: single positional indexer is out-of-bounds'

I was trying to encode some information ...READ MORE

May 23, 2022 in Python by Kichu
• 19,040 points
2,177 views
0 votes
0 answers

Relative imports - ModuleNotFoundError: No module named x

I have these  two files: test.py config.py These are the following ...READ MORE

May 23, 2022 in Python by Kichu
• 19,040 points
2,156 views
0 votes
0 answers

Flask ImportError: No Module Named Flask

I followed this flask tutorial: http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world. I am getting ...READ MORE

May 23, 2022 in Python by Kichu
• 19,040 points
2,640 views
0 votes
0 answers

Python: ValueError

Hello, I am getting the error "ValueError: could ...READ MORE

May 22, 2022 in Python by Ankita

edited Mar 4 179 views
0 votes
0 answers

I am getting a ValueError in python

embeddings_index = {} embedding_dim = 100 f = 'glove.twitter.27B.100d.txt' for ...READ MORE

May 22, 2022 in Python by Ankita

edited Mar 4 189 views
0 votes
0 answers

SUMMARY FUNCTION SHOWS NULL AND INTEGER IN R PROGRAMMING

I have data with Gender and protein expression ...READ MORE

May 21, 2022 in Python by Maria-Ornella

edited Mar 4 180 views
0 votes
0 answers

Writing a pandas DataFrame to CSV file

I want to write a pandas data ...READ MORE

May 21, 2022 in Python by Kichu
• 19,040 points
931 views
0 votes
0 answers

Python's equivalent of && (logical-and) in an if-statement

This is not  working : if cond1 && cond2: Can ...READ MORE

May 20, 2022 in Python by Kichu
• 19,040 points
601 views
0 votes
0 answers

ModuleNotFoundError: No module named 'sklearn'

I am using Anaconda and Python 3.6.1 ...READ MORE

May 20, 2022 in Python by Kichu
• 19,040 points
1,141 views
0 votes
0 answers

Constructing pandas DataFrame from values in variables gives "ValueError: If using all scalar values, you must pass an index"

If  I have two variables as follows: a ...READ MORE

May 19, 2022 in Python by Kichu
• 19,040 points
2,634 views
0 votes
0 answers

No acceptable C compiler found in $PATH when installing python

I followed this post to install a ...READ MORE

May 19, 2022 in Python by Kichu
• 19,040 points
1,725 views
0 votes
0 answers

Error in Python script "Expected 2D array, got 1D array instead:"?

I wanted to make this ML prediction: import ...READ MORE

May 18, 2022 in Python by Kichu
• 19,040 points
1,863 views
0 votes
0 answers

i am having error in python while working on speech recognition module

import speech_recognition as sr def takecommand(): ...READ MORE

May 14, 2022 in Python by anonymous

edited Mar 4 219 views
0 votes
0 answers

PermissionError: [Errno 13] Permission denied

This is the code : def download(): ...READ MORE

May 14, 2022 in Python by Kichu
• 19,040 points
3,661 views
0 votes
0 answers

"getaddrinfo failed", what does that mean?

I am getting this error when launching ...READ MORE

May 13, 2022 in Python by Kichu
• 19,040 points
1,362 views