1

The purpose is to create a weekly report where I compute some weekly metrics and have a latex template which will get updated with the latest metrics.

This latex template contains texts and tables. I want to modify just the table values.

I have a tex file (which I created) and I want to read this file in a python script and insert/update values into the table cell from a dataframe.

enter image description here

For this python script - Inputs: latex template. csv. Output: .pdf file path

\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}
Pallabi
  • 11
  • 1

0 Answers0