目的是创建一个每周报告,我在其中计算一些每周指标并有一个乳胶模板,该模板将使用最新的指标进行更新。
这个乳胶模板包含文本和表格。我只想修改表值。
我有一个 tex 文件(我创建的),我想在 python 脚本中读取这个文件,并将值从数据框插入/更新到表格单元格中。
对于这个 python 脚本 - 输入:乳胶模板。.csv。输出:.pdf 文件路径
\documentclass{article}%
\usepackage[T1]{fontenc}%
\usepackage[utf8]{inputenc}%
\usepackage{lmodern}%
\usepackage{textcomp}%
\usepackage{lastpage}%
\usepackage{geometry}%
\geometry{head=50pt,margin=0.5in,top=0.3in,bottom=0.7in,includeheadfoot=True}%
%
\title{Report }%
\date{\today}%
%
\begin{document}%
\normalsize%
\maketitle%
\section{Metrics}%
\label{sec:Metrics}%
This section covers all metrics related to drive time %
\subsection{Standalone Drive Time}%
\label{subsec:StandaloneDriveTime}%
Out of entire drive{-}time recorded, what would be the percentage driver assignment%
\begin{table}[h!]%
\begin{tabular}{|c|c|c|c|c|}%
\hline%
Sl No.&Week{-}26&Week{-}27&Week{-}28&WoW \%\\%
\hline%
VLS enabled&947&946&946&0\\%
\hline%
Total time (mins)&6729&6220&7074&13.73\\%
\hline%
\% VLS drive time&66.9&65.89&66.19&0.46\\%
\hline%
\end{tabular}%
\end{table}
%
Note: A recorded minute is considered as “drive minute” if speed exceeds 2mph at least once in a minute.
%
\subsection{Drive Time boost}%
\label{subsec:DriveTimeboost}%
On top of existing driver login system ....%
\begin{table}[h!]%
\begin{tabular}{|c|c|c|c|c|}%
\hline%
Sl No.&Week{-}26&Week{-}27&Week{-}28&WoW \%\\%
\hline%
Drive time (mins)&3482&3171&3673&15.83\\%
\hline%
Assignment by others&2925&2668&3098&16.12\\%
\hline%
\% Assignment by other&84.0&84.14&84.34&0.24\\%
\hline%
Additional VLS&309&277&327&18.05\\%
\hline%
\% Additional VLS&8.86&8.73&8.92&2.18\\%
\hline%
\end{tabular}%
\end{table}
%
\end{document}