Nan appears when python uses pandas to process csv files

import pandas as pd
self.url_list=pd.read_csv (". / files/baidusearch.csv", encoding= "utf-8")

        for link in self.url_list["link"]:

            if link:
                print("")
                print(link)

print link
nan
print link
nan
print link
http://www.mikuni-sh.com.cn/

the nan here is an empty string, but I have decided to print when it is not empty, how to avoid printing nan?

Dec.02,2021

1, nan are not used to represent empty strings, just not a number .
2, Python, except for the specified values that are processed as False, are all True. For some reason, it's a rule. python.org/2/library/stdtypes.html-sharptruth-value-testing" rel=" nofollow noreferrer "> Python truth
3. If this nan is really not a number , you can process nan as ', and your code can be executed normally.
4. If you are reading data from a csv file, the nan should be a string. All you have to do is judge if Linklink links and print it again .

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb06ab-48097.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb06ab-48097.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?