pandas-dev / pandas

Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
https://pandas.pydata.org
BSD 3-Clause "New" or "Revised" License
43.56k stars 17.89k forks source link

BUG: TemplateNotFound: latex_table.tpl #53140

Closed zhimin-z closed 1 year ago

zhimin-z commented 1 year ago

Pandas version checks

Reproducible Example

df = pd.read_json(os.path.join(path_general, 'metrics.json'))

df_topics = []
total_count = len(df)

for name, group in df.groupby('Challenge_topic_macro'):
    topic_info = {
        'Challenge topic': name,
        'Challenge count': group['Challenge_topic_macro'].count(),
    }
    df_topics.append(topic_info)

df_topics = pd.DataFrame(df_topics)
print(df_topics[['Challenge topic', 'Challenge count', 'Challenge proportion']].to_latex(
    index=False, float_format="{:.2f}".format))

Issue Description

image

Expected Behavior

It outputs latex as before.

Installed Versions

Name: pandas Version: 1.3.5 Summary: Powerful data structures for data analysis, time series, and statistics Home-page: https://pandas.pydata.org Author: The Pandas Development Team Author-email: pandas-dev@python.org License: BSD-3-Clause Location: /Users/jimmy/Documents/GitHub/Asset-Management-Topic-Modeling/.venv/lib/python3.9/site-packages Requires: numpy, python-dateutil, pytz Required-by: bertopic, FuzzyTM, label-studio-converter, seaborn, shap, statsmodels

zhimin-z commented 1 year ago

This issue gets solved when I upgrade to 2.1 version