Skip to content

Tag: nonetype

Replacing None with a list within a dataframe

I have the below dataframe which comes from a JSON trying to format ready for db insertion, i am splitting using .tolist() but getting error for None entries. tried fillna and replace to insert a dummy list i.e. [0,0,0] but will only let me replace with a string. Any suggestions welcome. this works #df_split_batl = df_split_batl.fillna(‘xx’) #df_split_batl = df_split_batl.replace(‘xx’,’yy’) but

Integrate Class

So I have been trying to create an integrate class for an assignment and while I have gotten a simple skeletal structure for the functions within said class, I keep on getting a None result, which really bugs me. The code that I have written down though is written below. What do I do to make this code work? Answer

How to clear this AttributeError “nonetype”?

I’m learning datastructure while compiling this mergesort linkedlist . I got this error. I tried so much but didn’t work. Can any one tell me what’s wrong? please . Traceback (most recent call last): File “C:Users**AppDataLocalProgramsPythonPython37merge_sort_ver_2.0 linked”, line 122, in File “C:Users**AppDataLocalProgramsPythonPython37merge_sort_ver_2.0 linked”, line 75, in merge_sort File “C:Users**AppDataLocalProgramsPythonPython37merge_sort_ver_2.0 linked”, line 94, in merge AttributeError: ‘NoneType’ object