Because want to read from the Dianping.com to climb down some data, so in the case of a bit big files caused jupyter directly blocked when reading, there are memory errors.
So how do you solve this problem?After some exploration, the shopkeeper finally found a solution. First, he wrote the solution code:
with open('The file you want to read.', 'r',encoding='utf-8') as f:
for line in f:
res = line
print(res)
Read More:
- How to Fix keyerror in Python dictionary lookup
- How to Fix “HTTP error 403: forbidden” in Python 3. X
- How to Fix Errors encountered in executing Python scripts with command line parameters
- Error reading file by pandas pandas.errors.EmptyDataError: no columns to parse from file
- Python: How to Encode the File (including HTML, TXT, Doc, etc.)
- How to Solve Error: RuntimeError CUDA out of memory
- How to Solve Python WARNING: Ignoring invalid distribution -ip (e:\python\python_dowmload\lib\site-packages)
- How to Fix pandas.errors.ParserError Error tokenizing data C error Buffer overflow caught
- Python: SVN deletes files on local and remote repositories
- [Solved] supervisor Error: /usr/local/lib/python2.7/dist-packages/pkg_resources/py2_warn.py:22: UserWarning: Setuptools will stop working on Python 2
- [Solved] Python Error: local variable ‘var‘ referenced before assignment
- [Solved] Python Read bam File Error: &&OSError: no BGZF EOF marker; file may be truncated
- [Solved] weditor Plug-in Dump Hierarchy Error: Local server not started, start with $ python -m weditor
- How to Fix tensorflow2.0 tf.placeholder Error
- Python openpyxl excel open zipfile error resolution: zipfile.BadZipFile: File is not a zip file
- Pychar: How to Fix using SQLite to report an error: java.lang.ClassNotFoundException
- How to Solve Python Pandas Read or Import Files Error
- Python: How to Auto Add Watermark to PDF
- [Solved] theano-GPU Error: pygpu.gpuarray.GpuArrayException: b‘cuMemAlloc: CUDA_ERROR_OUT_OF_MEMORY: out of memory
- Python: How to Set Line breaks and tabs for Strings