Файловый менеджер - Редактировать - /home/digitalm/venv/lib/python3.7/site-packages/openpyxl/utils/__pycache__/dataframe.cpython-37.pyc
Назад
B �5�g� � @ s@ d dl mZ d dlZd dlZd dlmZ d dd�Zddd �ZdS )� )� accumulateN)�prodTc c s ddl m} |r�| jjdkr*t| j|�}nt| jj�g}x\|D ]T}g }x*|D ]"}t|tj �rd||�}|� |� qLW |}|r�dg| jj | }|V q>W |r�| jjV dd� | jD �}| jjdkr�t| j�}x8t || jdd��D ]"\} }t|�}|r�| | }|V q�W dS ) a> Convert a Pandas dataframe into something suitable for passing into a worksheet. If index is True then the index will be included, starting one row below the header. If header is True then column headers will be included starting one column to the right. Formatting should be done by client code. r )� Timestamp� Nc s s | ]}|gV qd S )N� )�.0�vr r �N/home/digitalm-up/venv/lib/python3.7/site-packages/openpyxl/utils/dataframe.py� <genexpr>% s z$dataframe_to_rows.<locals>.<genexpr>F)�index)Zpandasr �columnsZnlevels�expand_index�list�values� isinstance�numpyZ datetime64�appendr �names�zipZ itertuples) Zdfr �headerr �rows�row�nr �expandedZdf_indexr r r �dataframe_to_rows s2 r Fc c s� t | j�}dgt|d � }g }xp|D ]h}dgt|� }d}x6tt||��D ]$\}\} } | | ksd|rL| ||<