Trending questions in Python

0 votes
1 answer

How to print error in web browser if there is error in code?

You can try to catch these errors ...READ MORE

Nov 6, 2020 in Python by Gitika
• 65,770 points
925 views
+1 vote
1 answer

How to install django in anaconda prompt?

Here are the steps that you can ...READ MORE

Jun 23, 2020 in Python by Sirajul
• 59,230 points
6,728 views
0 votes
1 answer

The below code prints none at the end.

the code after return does not execute. ...READ MORE

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

How to use in python for loop not equal marks? example: a!=0

Hello @Azizjon, You can go through the example ...READ MORE

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

How to check permission inside a template in Django?

Hello @kartik, To check for permissions in templates, ...READ MORE

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

how to fetch user details and send it to his email address using django rest framework

Hello @mahesh, First you have to fetch user ...READ MORE

Aug 18, 2020 in Python by Niroj
• 82,840 points
4,332 views
0 votes
0 answers

Which python projects are good for beginner If I already know the basics very well?

Which python projects are good for beginner ...READ MORE

Nov 19, 2020 in Python by samar
• 120 points
351 views
0 votes
1 answer

Unable to access UserProfile model fields in templates in Django.

Use {{ request.user.get_profile.whatever }}. Django's templating language ...READ MORE

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

How can I test if a string can be converted to another type dynamically?

You can use isinstance() function to check ...READ MORE

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

How to connect my app to mongo?

Most users try to use NoSQL-like DBs ...READ MORE

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

How to install PyTorch?

Here are the steps you can follow:  Install Python. ...READ MORE

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

what does this line fout.write("</{}>\n".format(opentags.pop())) do?

It closes one tag actually, opentags is ...READ MORE

Nov 10, 2020 in Python by Gitika
• 65,770 points
632 views
0 votes
0 answers

Help: Receive data from tkinter gui and perform mathematical operations between lists

hello friends, I have been working on a ...READ MORE

Nov 4, 2020 in Python by Jessica
• 120 points
940 views
0 votes
1 answer

While debugging in visual studio it runs but it doesn't show any error

You're sending infinitely increasing data. Maybe it's ...READ MORE

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

ImportError: No module named 'Cython'

Hi@akhtar, You need to install the Cython module ...READ MORE

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

How to implemented the custom user model?

Yes, pip install my plugin and check ...READ MORE

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

How to check the value is double in the existing data that when ever the values are double print thats value

Hey, @There, I guess regarding your query you ...READ MORE

Nov 3, 2020 in Python by Gitika
• 65,770 points
848 views
+1 vote
1 answer

'numpy.ndarray' object has no attribute 'append'

Hi@Noman, You created two empty list. And in ...READ MORE

May 17, 2020 in Python by MD
• 95,460 points
8,161 views
0 votes
1 answer

How to install module in virtual environment?

The Python installers for Windows include pip. ...READ MORE

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

what is the output of m = np.array([2,4,6]) n = np.array([2, True, False]) print(m+n)

Hi. @Nandini, The above code will give you ...READ MORE

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

return [x + y for x, y in zip(a, b)]

Hello @Ahmad, Could you please explain your workaround ...READ MORE

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

How to give local path instead of media URL?

If u are using iframe, you can ...READ MORE

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

How to see more rows in a dataframe?

You can go through the given below: pd.set_option('display.max_rows', ...READ MORE

Nov 10, 2020 in Python by anonymous
• 65,770 points
513 views
0 votes
1 answer

why is the dcount and tcount 0 and 0 in the output?

Because the dcount and tcount variables you ...READ MORE

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

How to take user input python3?

Use a while True: loop, to take input forever, ...READ MORE

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

How to convert a list into an array in Python?

Hi@akhtar, You need to import the NumPy module ...READ MORE

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

Is there any built in sorted data structure in python?

Yes. List is sortable. Dict is also ...READ MORE

Nov 4, 2020 in Python by Richa sharma
763 views
0 votes
1 answer

Is there anyway to get the total count of times of a Generator?

Generators are originally created to return an ...READ MORE

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

How to do math in a Django template?

Hello @kartik, You can use the add filter: {{ object.article.rating_score|add:"-100" }} Thank ...READ MORE

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

How do I get user IP address in django?

Hii Kartik, check uwsgi + django source code and pass static param ...READ MORE

Apr 23, 2020 in Python by Niroj
• 82,840 points
9,137 views
0 votes
1 answer

TypeError :Cannot cast Index to dtype int

use numpy  and use .astype(np,int) instead of ...READ MORE

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

How to check if a value exists in pandas dataframe index?

Hello @kartik, Basically instead of raising exception I ...READ MORE

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

Parse and restructure key:value pair of JSON Object to Python Object

@Khushboo, Can you link to a correctly formatted ...READ MORE

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

Support vector Regresson

Hi,@ Manoj, I would suggest you go through ...READ MORE

Nov 9, 2020 in Python by anonymous
• 65,770 points
485 views
0 votes
1 answer

ImportError: No module named django_extensions

Hello @kartik, You can solve this error by ...READ MORE

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

How to filter my model on the basis of text length in django?

Hello @kartik, For Django >= 1.8 you can ...READ MORE

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

How to remove all of the data in a table using Django?

Hello @kartik, Inside a manager: def delete_everything(self): ...READ MORE

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

Write program/code for below input to get required output.

That is a "set subtraction" operation. Use ...READ MORE

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

position error

Hi, @There, The key error generally means the ...READ MORE

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

How Django rest framework override page_size in ViewSet?

Hello @kartik, Fixed this by creating custom pagination ...READ MORE

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

How to change the default Django date template format?

Hello @kartik, Within your template, you can use ...READ MORE

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

Error:setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Hello @kartik, Try installing these packages. sudo apt-get install ...READ MORE

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

How to install pip?

'pip' is not recognized as an internal ...READ MORE

Nov 6, 2020 in Python by anonymous
• 65,770 points
456 views
0 votes
1 answer

How to add properties while installing GOTO?

You can follow a few steps: click advanced ...READ MORE

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

How to write a HDF file from a DataFrame?

Hi@akhtar, Hierarchical Data Format (HDF) is a set ...READ MORE

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

Why doesn't the button display below the message?

You can make use of the given ...READ MORE

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

compare two csv files and print the unique string in 3rd csv file.

Hi, @Smilish, I hope this below code will ...READ MORE

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

ModuleNotFoundError: No module named 'twilio'

Hi@akhtar, It seems you don't have a Twilio ...READ MORE

Jun 25, 2020 in Python by MD
• 95,460 points
6,242 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
525 views