Trending questions in Python

0 votes
1 answer

How do I perform query filtering in django templates?

Hello @KARTIK, Just add an extra template tag ...READ MORE

Jul 4, 2020 in Python by Niroj
• 82,880 points
12,055 views
0 votes
1 answer

How to catch multiple exceptions in one line in python?

From Python Documentation: An except clause may name multiple ...READ MORE

Dec 17, 2020 in Python by Gitika
• 65,910 points
4,840 views
0 votes
1 answer

How to call function that takes an argument in a Django template?

Hello @kartik, You cannot call a function that ...READ MORE

Jun 23, 2020 in Python by Niroj
• 82,880 points
12,481 views
0 votes
1 answer

Model Form “object has no attribute 'cleaned_data'” in Django?

Hello @kartik, For some reason, you're re-instantiating the ...READ MORE

Apr 29, 2020 in Python by Niroj
• 82,880 points
14,829 views
0 votes
1 answer

How to Clone Conda environment?

Hi@akhtar, You can use the --clone command to ...READ MORE

Jun 22, 2020 in Python by MD
• 95,440 points
12,448 views
0 votes
1 answer

I am not able to install pywin32 into my Macos ..I tried all the ways and I could not fix the error...can you please help me

Hello @Harikrishna, For your query you can refer ...READ MORE

Nov 23, 2020 in Python by Niroj
• 82,880 points
5,801 views
0 votes
1 answer

How to install packages using pip according to the requirements.txt file from a local directory?

This works for me: $ pip install -r ...READ MORE

Dec 4, 2020 in Python by Gitika
• 65,910 points
5,230 views
0 votes
1 answer

TypeError: Expected Ptr<cv::UMat> for argument '%s' ''

src is the first argument to cv2.cvtColor. The error you ...READ MORE

Oct 15, 2020 in Python by anonymous
• 65,910 points
7,363 views
0 votes
2 answers

How to change the font size on a matplotlib plot?

Functions dealing with text like label, title, etc. accept ...READ MORE

Jan 4, 2021 in Python by Carlos
3,808 views
0 votes
1 answer

How to convert multiple columns to string in pandas dataframe?

Hi, To convert multiple columns to string, include a list of ...READ MORE

Jul 19, 2019 in Python by Taj
• 1,080 points
26,989 views
0 votes
1 answer

How to list a column of float values from csv file without importing (Python)

Using the default CSV module Demo: import csv with open(filename, "r") ...READ MORE

Sep 16, 2020 in Python by Rajiv
• 8,910 points
8,476 views
0 votes
1 answer

ImportError: No module named pip when trying to install packages

Hello @kartik, I found that on Ubuntu, pip ...READ MORE

May 27, 2020 in Python by Niroj
• 82,880 points
13,280 views
0 votes
1 answer

Error:Django Rest Framework — no module named rest_framework

Hello @kartik, You just need to install django ...READ MORE

Jun 25, 2020 in Python by Niroj
• 82,880 points
11,975 views
0 votes
1 answer

How does numpy.newaxis work and when to use it?

Hello, The np.newaxis is generally used with slicing. It indicates ...READ MORE

Apr 14, 2020 in Python by Niroj
• 82,880 points
15,056 views
+1 vote
1 answer

Error:Getting Site Matching Query Does Not Exist Error after creating django admin

Hello @kartik, The Site object for your Django project is ...READ MORE

Jun 22, 2020 in Python by Niroj
• 82,880 points
11,920 views
0 votes
1 answer

How to expire session due to inactivity in Django?

Hello @kartik, Expire the session on browser close ...READ MORE

Aug 13, 2020 in Python by Niroj
• 82,880 points
9,720 views
0 votes
1 answer

if/else in a list comprehension

You can totally do that. It's just ...READ MORE

Dec 23, 2020 in Python by Gitika
• 65,910 points
3,969 views
0 votes
1 answer

What is the difference between pop() and remove()?

Array elements can be removed using pop() ...READ MORE

Jun 20, 2019 in Python by Nisa
• 1,090 points
27,811 views
0 votes
1 answer

How to look up a dictionary value with a variable in Django template?

Hii @kartik, Write a custom template filter: from django.template.defaulttags ...READ MORE

Aug 3, 2020 in Python by Niroj
• 82,880 points
10,123 views
0 votes
1 answer

How can I get the username of the logged-in user in Django?

Hello @kartik, You can use the request object ...READ MORE

Jul 29, 2020 in Python by Niroj
• 82,880 points
10,195 views
0 votes
1 answer

How can I get the absolute URL (with domain) in Django?

Hello @kartik, Use handy request.build_absolute_uri() method on request, pass it ...READ MORE

Aug 6, 2020 in Python by Niroj
• 82,880 points
9,783 views
0 votes
1 answer

How to convert list into 2 tuple pair list?

This should work: L = [1, 2, 3, ...READ MORE

Nov 4, 2020 in Python by Gitika
• 65,910 points
5,905 views
0 votes
1 answer

How to set value for particular cell in pandas DataFrame using index?

Why df.xs('C')['x']=10 does not work: df.xs('C') by default, returns a new ...READ MORE

Jan 5, 2021 in Python by Gitika
• 65,910 points
3,200 views
0 votes
1 answer
0 votes
2 answers

ImportError: No system module 'pywintypes' (pywintypes38.dll)

I just copied the DLL pywintypes27.dll in C:\Python27\Lib\site-packages\pywin32_system32. I added it ...READ MORE

Nov 25, 2020 in Python by Roshni
• 10,520 points
4,882 views
+1 vote
2 answers

Replace every character of string by character whose ASCII value is K times more than it

Refer below code for your problem statement def ...READ MORE

May 17, 2020 in Python by Kumar Sambhawam

edited May 18, 2020 by Gitika 16,771 views
0 votes
1 answer

How to find which version of package is installed with pip?

As of pip 1.3, there is a pip show command. $ ...READ MORE

Dec 4, 2020 in Python by Gitika
• 65,910 points
4,513 views
0 votes
1 answer

Python and pip, list all versions of a package that's available?

The script at Pastebin does work. However, ...READ MORE

Nov 22, 2020 in Python by Gitika
• 65,910 points
5,020 views
0 votes
1 answer

Error is '<' not supported between instances of str and int

your dis is obviously not 1.13, it's ...READ MORE

Nov 15, 2020 in Python by Gitika
• 65,910 points
5,300 views
0 votes
1 answer

How to return the current user with Django Rest Framework?

Hello @kartik, The best way is to use ...READ MORE

Jun 25, 2020 in Python by Niroj
• 82,880 points
11,482 views
0 votes
1 answer

Error: port is already in use of Django Server

Hii @kartik, Just type sudo fuser -k 8000/tcp. This ...READ MORE

May 6, 2020 in Python by Niroj
• 82,880 points
13,557 views
0 votes
1 answer
0 votes
1 answer

React native for frontend and python is for backend app development it is possible??

Hello @Rithika , Yes, it is possible. For example, you ...READ MORE

Oct 30, 2020 in Python by Niroj
• 82,880 points
5,866 views
0 votes
1 answer

Getting error "AttributeError: 'Screen' object has no attribute 'title' on line 8"

Hey @TedTickles,  Replace  wn.update() with turtle.up ...READ MORE

Dec 24, 2020 in Python by Gitika
• 65,910 points
3,489 views
0 votes
0 answers

error install mysqlclient on windows

i have that error (dont find answer) ...READ MORE

Feb 7, 2021 in Python by anonymous
• 120 points
1,515 views
0 votes
1 answer

Importing files from different folder in python.

By default, you can't. When importing a ...READ MORE

Dec 20, 2020 in Python by Nikita
3,562 views
0 votes
1 answer

How do I install a Python package with a .whl file?

I just used the following which was ...READ MORE

Nov 20, 2020 in Python by Gitika
• 65,910 points
4,816 views
0 votes
3 answers

How do I use raw_input in Python 3?

raw_input() was renamed to input() in Python 3. Another example ...READ MORE

Jan 4, 2021 in Python by Carlos
2,765 views
+1 vote
2 answers

sklearn.cross_validation import train_test_split not working

How ever now its in model selection ...READ MORE

Jul 17, 2020 in Python by karthikeyan
17,867 views
0 votes
1 answer

How to avoid missing module docstring in pylint?

Either write your docs or use a ...READ MORE

Nov 6, 2020 in Python by anonymous
• 65,910 points
5,358 views
0 votes
1 answer

How to compare two JSON objects with the same elements in a different order equal?

Hello @kartik, If you want two objects with ...READ MORE

Aug 7, 2020 in Python by Niroj
• 82,880 points
9,291 views
+1 vote
1 answer

Error:Unable to import path from django.urls

Hello @kartik, You need Django version 2 pip install ...READ MORE

Jul 2, 2020 in Python by Niroj
• 82,880 points
10,789 views
0 votes
1 answer

How do I update pip itself from inside my virtual environment?

Hello, pip is just a PyPI package like any other; you ...READ MORE

Nov 20, 2020 in Python by Niroj
• 82,880 points
4,715 views
0 votes
2 answers

what path should I give to the url for showing a pop up when clicking on "more info" button in django?

I think u can use the bootstrap ...READ MORE

Dec 29, 2020 in Python by Carlos
2,995 views
0 votes
1 answer

How to find the value of a row in a csv file in python and print column and row of that value ?

Hello @Khanhh , Use panda to find the value of ...READ MORE

Oct 15, 2020 in Python by Niroj
• 82,880 points
6,252 views
0 votes
1 answer

AssertionError: <class 'numpy.ndarray'>

Same problem here bro! READ MORE

Dec 8, 2020 in Python by Bijoy
4,010 views
0 votes
1 answer

How do you add a background thread to flask in Python?

The example below creates a background thread ...READ MORE

Nov 19, 2018 in Python by Nymeria
• 3,560 points
36,261 views
0 votes
2 answers

ModuleNotFoundError: No module named 'pythoncom' in pyttsx3

even i faced the same problem ...just ...READ MORE

Jun 2, 2020 in Python by anonymous
12,992 views
0 votes
1 answer

shows "name connection not defined"

Hi, @Imthiii, Try removing the bracket you have ...READ MORE

Sep 17, 2020 in Python by Rajiv
• 8,910 points
7,257 views