Avatar ·

__init__() takes 1 positional argument but 2 were given

📁 python, вопрос, django, новичок, работа, проект

I'm a beginner in Django so I'm asking for help from more experienced people.

This is a frontend application, like a project start page, and the class is a model with links to other applications. That is, the site header. I expect a working result from this. And it probably works, but throws the exception from the title of my question.

from django.db import modelsclass LinksInHeader(models.Model):    navigate = models.CharField(max_length=16)    link_way = models.CharField(max_length=16)    def __str__(self):    retu self.navigate    

                    
                
Avatar ·

Try using the method to replace 'Not Provided' with NaN, for example.

In [1]: import pandas as pdIn [3]: import numpy as npIn [5]: df = pd.DataFrame([[0.1, 5.0, 'Not Provided'], ['Not Provided', 0.2, 3.3]])In [6]: dfOut[6]:               0    1             20           0.1  
                            

Log in to leave an answer

Blogs