steps
1. In default environment:
conda install nb_conda_kernels
2. Then activate different virtual environments and install IpyKernel
conda install ipykernel
3. Restart Jupyter Notebook
steps
1. In default environment:
conda install nb_conda_kernels
2. Then activate different virtual environments and install IpyKernel
conda install ipykernel
3. Restart Jupyter Notebook
A line of content read by CSV contains a null byte
which in Python is \x00
In [1]: a = '\0'
In [2]: a
Out[2]: '\x00'
In [3]: b = '\x00'
In [4]: b
Out[4]: '\x00'
In [5]: a == b
Out[5]: True
Make an error file like this, print it out in PyCharm, and then copy the printed result to a CSV file
print('1,\x00,2')
OK, the exception file has the
test code
with open('file.csv', 'r') as f:
reader = csv.reader(f)
next(reader)
Error: line contains NULL byte
. So, how do you do that
Modify the code
with open('file.csv', 'r') as f:
reader = csv.reader(_.replace('\x00', '') for _ in f)
next(reader)
Why this terrible mistake?
1. The data in it has this thing
2. The file is an excel file, but the result is saved as CSV
3. Multiple processes read and write to the same file
Q:
TypeError at /edit_user/ ‘set’ object is not reversed.
error page as shown
as shown, this could be a url. Py urlpatterns file is a collection of the set {}. We just change it to list type [].
then you can redirect the