Trending questions in Python

0 votes
1 answer

How do I include related model fields using Django Rest Framework?

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

Jul 1, 2020 in Python by Niroj
• 82,840 points
3,708 views
0 votes
1 answer

How to convert JSON data into a Python object?

Hello @kartik, You can do it in one ...READ MORE

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

How to capture URL parameters in request.GET

Hello @kartik, When a URL is like domain/search/?q=haha, you ...READ MORE

Aug 6, 2020 in Python by Niroj
• 82,840 points
2,161 views
+1 vote
1 answer

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

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

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

How to check if any value is NaN in a Pandas DataFrame?

Hello @kartik, If you need to know how ...READ MORE

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

How to create Bubble Chart using Pandas?

Hi@akhtar, You can use scatter function in Pandas. ...READ MORE

Jun 26, 2020 in Python by MD
• 95,460 points
3,829 views
0 votes
1 answer

Python interpreter error: I have installed Python 3.8 but it shows version 3.7

Hi, While installing Python 3.8 there was a box ...READ MORE

Jul 2, 2020 in Python by Gitika
• 65,770 points
3,717 views
0 votes
1 answer

How to save one list in a text file in Python?

Hi@akhtar, There is no inbuilt function available to ...READ MORE

Jun 25, 2020 in Python by MD
• 95,460 points
3,804 views
0 votes
2 answers

What is difference between genarator and iterator

Hello @ Ramesh Generator Iterator Implemented using a function. Implemented using a ...READ MORE

Aug 17, 2020 in Python by Niroj
• 82,840 points
1,468 views
0 votes
2 answers

Run a python script that automates create operation of 10000 entries in mongodb on spring tool suite

You can write a simple loop to ...READ MORE

Aug 24, 2020 in Python by Richa sharma
1,207 views
0 votes
0 answers

How to write this condition in one line and run this.

Hello, I have a dataframe that contain ...READ MORE

Sep 7, 2020 in Python by moli
• 140 points
640 views
0 votes
1 answer

how can i extact all the links from a website using python and save it in a csv file ?

Hi, @Shubham, Web scraping is the technique to ...READ MORE

Jun 16, 2020 in Python by Gitika
• 65,770 points
4,152 views
0 votes
1 answer

How can I optimize this condition so that it takes less time to execute in Python Pandas.

Hello @moli, You can easily optimize this code ...READ MORE

Sep 8, 2020 in Python by Niroj
• 82,840 points
499 views
0 votes
0 answers

AttributeError: 'DataFrame' object has no attribute 'is_impossible'

from collections import Counter import re import numpy as ...READ MORE

Mar 10, 2020 in Python by Mohammed
• 120 points

edited Mar 11, 2020 by Gitika 8,374 views
0 votes
1 answer

How to create an empty NumPy array?

Hey, @Roshni, To create an empty array with ...READ MORE

Jun 24, 2020 in Python by Gitika
• 65,770 points
3,777 views
0 votes
1 answer

Python Error: Can't find '_main_' module in 'C:/Users/DELL/Pythonprojects/Aks'

I can see there no Python file ...READ MORE

Jun 25, 2020 in Python by Karan
• 19,610 points
3,674 views
0 votes
1 answer

How to produce a list with unique elements from a list with duplicate elements?

Hey, @Roshni, Iterating the list is not a ...READ MORE

Jun 26, 2020 in Python by Gitika
• 65,770 points
3,618 views
0 votes
1 answer

How to query as GROUP BY in django?

Hii, Django does not support free group by ...READ MORE

Apr 23, 2020 in Python by Niroj
• 82,840 points
6,386 views
0 votes
0 answers
0 votes
1 answer

ModuleNotFoundError: No module named 'bitcoin'

Hi@akhtar, It seems this module is not available ...READ MORE

Jul 23, 2020 in Python by MD
• 95,460 points
2,386 views
0 votes
1 answer

Error:django.core.exceptions.ImproperlyConfigured

Hello @kartik, You can set fields or exclude ...READ MORE

Jul 3, 2020 in Python by Niroj
• 82,840 points
3,229 views
0 votes
1 answer

how do i get anova table of split plot design or factorial experimental design in python?

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

Aug 24, 2020 in Python by Niroj
• 82,840 points
1,013 views
0 votes
0 answers

avro schema validation with shuffled columns

I want to validate my incoming Avro ...READ MORE

Aug 22, 2020 in Python by khyati
• 190 points
1,088 views
0 votes
1 answer

How to get the ASCII values of a character in python?

You can get the ASCII value of ...READ MORE

Aug 23, 2020 in Python by Sajetha Selva
9,705 views
0 votes
1 answer

How to make the user in a model default to the current user?

Hello @kartik, You have to override get_changeform_initial_data method in your ...READ MORE

Jun 12, 2020 in Python by Niroj
• 82,840 points
4,107 views
0 votes
11 answers

“pip install unroll”: “python setup.py egg_info” failed with error code 1

rm -rf node_modules READ MORE

Jun 27, 2019 in Python by anonymous
24,559 views
0 votes
1 answer

How do I use the built in password reset/change views with my own templates?

Hello @kartik, You'll notice that password_reset takes a named parameter ...READ MORE

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

How to check the memory usage of an object in python

Hi, @Roshni, You can use this code below: import ...READ MORE

Jun 26, 2020 in Python by Gitika
• 65,770 points
3,466 views
0 votes
1 answer

How to inject errors into already validated form?

Hello @kartik, For Django 1.7+, you should use form.add_error() instead ...READ MORE

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

correct use of random.seed() in reading a text file

Hi, @Flygen, Seeding a pseudo-random number generator gives ...READ MORE

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

How to manage development and production settings in django?

Hello @kartik, I usually have one settings file ...READ MORE

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

ModuleNotFoundError: No module named 'pyGTK'

Hi@akhtar, It seems you didn't install this module ...READ MORE

Jun 29, 2020 in Python by MD
• 95,460 points
3,225 views
0 votes
1 answer

Need help with the output of a code snippet.

If you write x.insert(2,3) and then print x ...READ MORE

Jun 23, 2020 in Python by Viraj Doshi
3,469 views
0 votes
1 answer

How do I read CSV data into a record array in NumPy?

Hello @kartik, You can use Numpy's genfromtxt() method to do ...READ MORE

Jun 22, 2020 in Python by Niroj
• 82,840 points
3,504 views
0 votes
1 answer

driver.find_elements_by_css_selector("input[placeholder='from']").send_keys("del") AttributeError: 'list' object has no attribute 'send_keys'

Hey, @Nupur, You are getting a list of web elements ...READ MORE

May 20, 2020 in Python by Gitika
• 65,770 points
4,895 views
0 votes
1 answer

What is difference between "inplace = True" and "inplace = False?

Hi, Both inplace= true and inplace = False ...READ MORE

Aug 9, 2019 in Python by Taj
• 1,080 points
17,199 views
0 votes
1 answer

How to allow users to change their own passwords in Django?

Hello @kartik, See the Changing passwords section Navigation to your project ...READ MORE

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

While working on VIF in multiple regression I came across this problem

Hello, @Pawan, The as_matrix method is deprecated since 0.23.0, so ...READ MORE

Aug 11, 2020 in Python by Dhiman
1,295 views
0 votes
1 answer
0 votes
1 answer

please explain me what does i-1 in python user_define function

i - 1 is the index of ...READ MORE

Jun 28, 2020 in Python by Shaurya Thapliyal
• 340 points
3,199 views
0 votes
1 answer

How to send image to firebase using python in raspberry pi?

Here's a code snippet demonstrating the same. # ...READ MORE

Jun 23, 2020 in Python by Sam
• 6,260 points
3,308 views
0 votes
1 answer

How can I get dict from sqlite query?

Hii, Even using the sqlite3.Row class-- you still ...READ MORE

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

How to override the default value of a Model Field from an Abstract Base Class

Hello @kartik, You can do this as follows: class ...READ MORE

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

How to test an API endpoint with Django-rest-framework using Django-oauth-toolkit for authentication?

Hello @kartik, You should avoid making unneeded API calls, ...READ MORE

Jul 2, 2020 in Python by Niroj
• 82,840 points
2,899 views
0 votes
0 answers

How do I clone a Django model instance object and save it to the database?

In the database, I want to add ...READ MORE

Jun 22, 2020 in Python by kartik
• 37,520 points
3,307 views
0 votes
1 answer

How to count the frequency of the words in the file in Python?

Hi@akhtar, You can use the Counter module to ...READ MORE

Jun 26, 2020 in Python by MD
• 95,460 points
3,045 views
0 votes
1 answer

Where can I find the error logs of nginx, using FastCGI and Django?

Hello @kartik, Errors are stored in the nginx ...READ MORE

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

How can I upgrade specific packages using pip and a requirements file?

Hello @kartik, According to pip documentation example 3: pip install --upgrade ...READ MORE

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

python error "AttributeError: 'NoneType' object has no attribute 'read'"

The microphone needs to be entered using ...READ MORE

Oct 3, 2019 in Python by Jack
14,515 views