Trending questions in Python

0 votes
1 answer

Error:“Unknown command syncdb” running “python manage.py syncdb”

Hello @kartik, $python manage.py syncdb is deprecated and not ...READ MORE

Aug 5, 2020 in Python by Niroj
• 82,840 points
4,467 views
0 votes
1 answer

How to pass django rest framework response to html?

Hello @kartik, You need to use an @api_view decorator ...READ MORE

Jun 25, 2020 in Python by Niroj
• 82,840 points
6,223 views
0 votes
1 answer

How to add annotate data in django-rest-framework queryset responses?

Hello @kartik, The queryset returned from get_queryset provides ...READ MORE

Jun 25, 2020 in Python by Niroj
• 82,840 points
6,213 views
0 votes
1 answer

How to add Django script to access model objects without using manage.py shell?

Hello @kartik, Use the following and you will be ...READ MORE

Jun 29, 2020 in Python by Niroj
• 82,840 points
6,036 views
0 votes
1 answer

How to reverse a string in Python using slicing operator?

Hi@akhtar, Strings can be reversed using slicing. To ...READ MORE

Aug 17, 2020 in Python by MD
• 95,460 points
3,943 views
0 votes
1 answer

How do I count the number of times the string (y/n) outputs

Hi, @Reshma, You can go through this as ...READ MORE

Oct 13, 2020 in Python by Lisa sanyal
1,457 views
0 votes
1 answer

is there a way to send sql query data from redshift and send the data via email to sns?

I resolved this issue using AWS Glue ...READ MORE

Nov 21, 2020 in Python by Ruben
• 180 points
1,584 views
0 votes
1 answer

when I run this, I get NameError: name 'state' is not defined error. How to solve this?

Hi@MUHAMMAD, I tried to run the exact code ...READ MORE

Sep 8, 2020 in Python by MD
• 95,460 points
2,997 views
0 votes
1 answer
0 votes
1 answer

ModuleNotFoundError: No module named 'stl'

Hi@akhtar, I had the same problem when installing ...READ MORE

Jul 15, 2020 in Python by MD
• 95,460 points
5,306 views
0 votes
1 answer

How I can find array in array?

I guess the given below will b ...READ MORE

Nov 4, 2020 in Python by Gitika
• 65,770 points
491 views
0 votes
0 answers

TypeError: tuple indices must be integers or slices, not tuple

Im a begginer and im trying to ...READ MORE

Oct 19, 2020 in Python by peyman
• 120 points

edited Oct 19, 2020 by Gitika 1,219 views
0 votes
1 answer

In python whats difference between default constructor and no parameter constructor?

The default constructor is called when there ...READ MORE

Oct 6, 2020 in Python by Gitika
• 65,770 points
1,705 views
0 votes
1 answer

How to make this add every number %a == 0 in the loop?

You can go through the given below ...READ MORE

Nov 4, 2020 in Python by Gitika
• 65,770 points
465 views
0 votes
2 answers

How do you convert a dictionary to a defaultdict?

from collections import defaultdict a = {1: 2, ...READ MORE

Aug 2, 2019 in Python by Mohammad
• 3,230 points
10,424 views
0 votes
1 answer

I am getting output - "def"

You can make a change to your ...READ MORE

Nov 4, 2020 in Python by Gitika
• 65,770 points
450 views
0 votes
1 answer

How do I update the file name itself in python?

Consider I as the integer value  Increment ...READ MORE

Oct 29, 2020 in Python by anonymous
• 65,770 points
672 views
0 votes
1 answer

What is the difference between visual studio and idle in python programming??

Both are actually IDE-s I don't know ...READ MORE

Oct 16, 2020 in Python by Gitika
• 65,770 points
1,197 views
0 votes
1 answer

How can I render HTML to PDF in Django site?

Hello @kartik, Use this code to generate the PDF ...READ MORE

Jul 29, 2020 in Python by Niroj
• 82,840 points
4,608 views
+1 vote
1 answer

How to change the order of DataFrame columns in pandas?

Hi@akhtar, You can rearrange a DataFrame object by ...READ MORE

Oct 20, 2020 in Python by MD
• 95,460 points
960 views
0 votes
1 answer

I want to generate Fibonacci sequence of 100 numbers in Linked list and then reverse in python

Hey,  You can go through the given example ...READ MORE

Oct 12, 2020 in Python by Gitika
• 65,770 points
1,339 views
0 votes
1 answer

Is python partially compiled and partially interpreted?

Hi, @Sonali, You can check this out https://www.edureka.co/community/6776/compiled-vs-interpreted-languages, as ...READ MORE

Oct 22, 2020 in Python by Gitika
• 65,770 points
897 views
0 votes
0 answers

TypeError: only size-1 arrays can be converted to Python scalars

This is my code for key in bboxes: bbox ...READ MORE

May 19, 2020 in Python by Rumia
• 120 points

edited May 19, 2020 by Gitika 1,760 views
0 votes
1 answer

Error: Name is not defined, It’s not returning a value

Remove main & try or  Use __name__ instead ...READ MORE

Oct 12, 2020 in Python by Gitika
• 65,770 points
1,245 views
0 votes
1 answer

What is the best online python compiler for running python scripts?

You can use Microsoft azure notebooks to ...READ MORE

Oct 14, 2020 in Python by anonymous
• 65,770 points
1,154 views
0 votes
1 answer

How to scrape data from infinite scroll website using scrapy?

Hello, @Detrod, Regarding your query, I guess you ...READ MORE

Jul 17, 2020 in Python by Rashmi
5,003 views
0 votes
0 answers

How to click on the main menu and sub menu using python script

How to proceed with main menu and ...READ MORE

Oct 6, 2020 in Python by ParthivPatel
• 140 points
1,548 views
0 votes
1 answer

How to write a code In Python where input will be 1 then the output will be 2?

You can go through this:  def num(number): ...READ MORE

Oct 7, 2020 in Python by Gitika
• 65,770 points
1,480 views
0 votes
1 answer

Error: (2_0.W001) has a route that contains '(?P<', begins with a '^', or ends with a '$'

Hello @kartik, The new path() syntax in Django 2.0 does ...READ MORE

Jul 2, 2020 in Python by Niroj
• 82,840 points
5,624 views
0 votes
1 answer

How can modify request.data in django REST framework?

Hello @kartik, Generally request in drf views is rest_framework.request.Request instance. Following to ...READ MORE

Jul 2, 2020 in Python by Niroj
• 82,840 points
5,655 views
0 votes
1 answer

Could not find a version that satisfies the requirement PIL==1.1.7 #6

Honestly, as long as you have the ...READ MORE

Sep 11, 2020 in Python by Gitika
• 65,770 points
2,475 views
0 votes
1 answer

How can we do the below modulo operation in python guys?

Expecting some operations, not loop. As because of ...READ MORE

Oct 14, 2020 in Python by anonymous
• 65,770 points
1,026 views
0 votes
1 answer

How to reset Django admin password?

Hello @kartik, Just try this: python manage.py changepassword <user_name> Hope ...READ MORE

Aug 6, 2020 in Python by Niroj
• 82,840 points
3,987 views
0 votes
1 answer

How to call function in django ?

Hi, @Hari, Are you facing any error while ...READ MORE

Oct 12, 2020 in Python by Gitika
• 65,770 points
1,073 views
0 votes
1 answer

Code for motion detection with opencv Youtube tutorial please

Hey, @Ashay, You can even go through this: https://www.youtub ...READ MORE

Oct 19, 2020 in Python by Gitika
• 65,770 points
763 views
0 votes
1 answer

what is if __name__ =='__main__: in python

Hello @Joy, '__main__' is the name of the scope ...READ MORE

Oct 20, 2020 in Python by Niroj
• 82,840 points
706 views
0 votes
1 answer

ModuleNotFoundError: No module named 'pyperclip

Hi@akhtar, You may get this error if this ...READ MORE

Jun 23, 2020 in Python by MD
• 95,460 points
5,831 views
0 votes
1 answer

cmd showing the interpreter error and version 3.7 showing?

You can add python3.8 in the environment ...READ MORE

Oct 14, 2020 in Python by anonymous
• 65,770 points
892 views
0 votes
1 answer

FileNotFound error

PATH is an issue here. It should ...READ MORE

Oct 16, 2020 in Python by anonymous
• 65,770 points
751 views
0 votes
1 answer

banking marketing domain

Hi, @Ghazala, What is your exact query here? ...READ MORE

Oct 12, 2020 in Python by Gitika
• 65,770 points
993 views
0 votes
1 answer

SyntaxError: invalid syntax in inline function.

Hi@akhtar, You need to write your if-else code ...READ MORE

Oct 5, 2020 in Python by MD
• 95,460 points
1,256 views
0 votes
1 answer

Error:urllib and “SSL: CERTIFICATE_VERIFY_FAILED”

Hello @kartik, Insert this code at the beginning ...READ MORE

Jun 5, 2020 in Python by Niroj
• 82,840 points
6,503 views
0 votes
1 answer

Error:Invalid http_host header

Hello @kartik, The error log is straightforward. As ...READ MORE

Jun 30, 2020 in Python by Niroj
• 82,840 points
5,383 views
0 votes
1 answer
0 votes
1 answer

Reverse a string in Python

You should try to use the following ...READ MORE

Feb 8, 2022 in Python by Rahul
• 9,680 points
775 views
0 votes
1 answer

How to create login user using Django Rest Framework?

Hello @Reebika , For you query you can refer ...READ MORE

Oct 12, 2020 in Python by Niroj
• 82,840 points
890 views
0 votes
1 answer

How to pre-populate FormView with dynamic data?

Hello @kartik, You can override the FormView class's ...READ MORE

Jul 29, 2020 in Python by Niroj
• 82,840 points
4,100 views
0 votes
1 answer

How to install voice recognizer in python?

You can install the Speech Recognition library ...READ MORE

Oct 15, 2020 in Python by anonymous
• 65,770 points
728 views
0 votes
1 answer

Error executing Jupyter command 'notebook': [Errno 2] No such file or directory

Hi@akhtar, I think there is a problem with ...READ MORE

Jun 25, 2020 in Python by MD
• 95,460 points
5,552 views
0 votes
1 answer

Can anyone explain me this error?

It is an Indentation error. There should be ...READ MORE

Oct 14, 2020 in Python by Gitika
• 65,770 points
746 views