Trending questions in Python

0 votes
1 answer

Error:Pip install: can't open file pip, or Parent module '' not loaded

Hello @kartik, Assuming you have pip installed and ...READ MORE

Jul 3, 2020 in Python by Niroj
• 82,880 points
6,331 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
313 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,890 points
541 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,880 points
4,273 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,890 points
394 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,890 points
2,156 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,602 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,880 points
4,683 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,890 points
494 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
904 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,890 points
344 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,890 points
559 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,890 points
1,093 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,890 points
436 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,890 points
521 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,890 points
802 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,890 points
473 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,890 points
383 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,890 points
639 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,890 points
471 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,890 points
743 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
711 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,890 points
593 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,043 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,547 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,890 points
680 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,890 points
1,513 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,576 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,890 points
453 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,890 points
2,089 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,880 points
9,024 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,880 points
6,350 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,880 points
4,125 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,890 points
417 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,890 points
412 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,880 points
6,636 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,880 points
7,060 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,880 points
6,176 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,233 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,890 points
983 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,880 points
5,900 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,890 points
1,718 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,890 points
489 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,880 points
4,313 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,890 points
475 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,880 points
4,065 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,890 points
441 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,890 points
492 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,890 points
7,143 views