- Zip file created in python using:
import zipfile
zf = zipfile.ZipFile(zip_file_path, "w", zipfile.ZIP_DEFLATED)
zf.write(file, os.path.basename(file))
- When unzipping file, got error:
| import logging, time | |
| from timer import timed | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.DEBUG) | |
| handler = logging.StreamHandler() | |
| handler.setLevel(logging.DEBUG) | |
| logger.addHandler(handler) |
import zipfile
zf = zipfile.ZipFile(zip_file_path, "w", zipfile.ZIP_DEFLATED)
zf.write(file, os.path.basename(file))
import pandas as pd
import zipfile
zip_file_path = 'file_path'
zf = zipfile.ZipFile(zip_file_path)
csv_file_name = 'csv_file_name'
df = pd.read_csv(zf.open(csv_file_name))
import os
file_path = 'path/to/file/example.csv'
filename_w_ext = os.path.basename(file_path)
filename, file_ext = os.path.splitext(filename_w_ext)
Output:
MYSQL
UNIX_TIMESTAMP('2018-09-25', 'yyyy-MM-dd')
FROM_UNIXTIME(1255033470, 'yyyy-MM-dd')
git clone xxx
git remote add <another-fork-alias> <another-fork-URL>
git checkout <local_branch>
virtualenv --python=<local_python_path> <venv_name>
.gitignore
git config core.fileMode false
git config core.autocrlf or git config --global core.autocrlf or git config --local core.autocrlf