Trending questions in Python

0 votes
1 answer

How to load a custom JS file in Django admin home?

Hello @kartik, You can override templates/admin/index.html and add the JavaScript ...READ MORE

May 14, 2020 in Python by Niroj
• 82,840 points
8,038 views
0 votes
1 answer

What is selenium in python?

It is known as Web automations, It is ...READ MORE

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

Does Python have a ternary conditional operator?

Think of the conditional expression as switching ...READ MORE

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

what is vm options ? I installed Pycharm on my pc but it shows no vm options file found . What should i do please help me to fix it

Hi, @Mushfiqkhantrial, It is important to run pycharm.sh from the bin folder. The VM ...READ MORE

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

IndentationError: expected an indented block

Hi, @Baker, Putting in extra space or leaving ...READ MORE

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

How to configure where to redirect after a log out in Django?

Hello @kartik, You don't need to overwrite or ...READ MORE

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

How to order_by a JSON from serializers.py file in django rest framework?

Hello @kartik, There's an easy way, just override ...READ MORE

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

How I can remove day and time from TimeStamp?

You can follow the below given: '{:%Y-%m}'.format(dt.strptime(str(key), '%Y-%m-%d ...READ MORE

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

How to filter Pandas DataFrame by values of columns?

Hi@akhtar, You can filter Pandas Dataframe with the ...READ MORE

Oct 20, 2020 in Python by MD
• 95,460 points
1,119 views
+1 vote
1 answer

Web Scraping with Python:-> ModuleNotFoundError: no module named 'selenium'

Hello @shamsher, First try to check what version ...READ MORE

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

What is the basic difference between T-Test, Z-Test, Chi-Square and Annova test?

If we are using one numerical variable ...READ MORE

Oct 29, 2020 in Python by Gitika
• 65,770 points
746 views
0 votes
3 answers

How to draw a tic tac toe board in python?

def printTable():             for i in range(1,10):                     print(" ",end=' ')                     if(i%3==0 ...READ MORE

Oct 11, 2020 in Python by Sumit Nagpal
11,639 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,155 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,391 views
0 votes
1 answer

How to remove a file using the OS module in Python?

Hi@akhtar, In Python, you can use the os. remove() method to remove ...READ MORE

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

ModuleNotFoundError: No module named 'pyttsx3'

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

Oct 7, 2020 in Python by Niroj
• 82,840 points
1,639 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
441 views
0 votes
1 answer
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,155 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
417 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,496 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
401 views
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,308 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,805 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,875 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,587 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
612 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
5,856 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,553 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,287 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
886 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,081 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
793 views
0 votes
1 answer

Error like “Your CPU not supported AVX , AVX2”

Your CPU is supported, Only the Binary was ...READ MORE

Oct 14, 2020 in Python by anonymous
• 65,770 points
1,112 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,190 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
5,899 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,094 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,471 views
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
4,980 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
4,875 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,341 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,507 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,395 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,035 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,394 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
656 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
892 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
669 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,870 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
938 views