readfile = pd.read_csv('42.csv')
filevalues= readfile.loc[readfile['Customer'].str.contains('Lam Dep', na=False), 'Jun-18\nQty']
filevalues = filevalues.fillna(0)
print(filevalues)
I have sales forecast files that have the same format as each other. When I change the value of the read file ( right now im reading file 42.csv), sometimes the columns will fill with 0 for null values and sometimes they do not
I am unsure why this happens as all the files have the same format and seem very identical.Any thoughts of why this may be happening? And please let me know if a screenshot of my files is needed
In addition, for the files that do not fill, when I run this program withou the fillvalues.fillana(0) function, then the files that do not fill with 0, still just show blank spaces, while the files that do fill with 0 do show nAn. I suppose a better question would be is that for both files, they have blank spaces, but python seems to detect some of them as nAn and some of them as just blanks and does not write anything there. Why??