Pandas version checks
Reproducible Example
import pandas as pd
print(pd.DataFrame([{'a': 1.1}]*10).to_string(max_rows=5, min_rows=1))
a
0 1.1
1 1.1
2 1.1
3 1.1
4 1.1
.. ...
Issue Description
When i provide min_rows=1 in dataframe.to_string, i should see The number of rows to display in the console in a truncated repr (when number of rows is above max_rows)..
However, in my example the number of rows displayed are the first 5 instead of only 1. By seting min_rows=2 the behaviour is consistent with the doc.
Side note: I am unsure if this is really a bug, or a hidden feature that should simply be documented: by setting min_rows=1 I could actually get what I was trying to achieve, i.e., display truncated dataframes by showing the first N rows + "...", instead of breaking into two chunks separated by "...". so, if this is a bug side effect, I would be nice to have it as feature
Thank you
Expected Behavior
Installed Versions
Details
3.0.1
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
When i provide
min_rows=1indataframe.to_string, i should see The number of rows to display in the console in a truncated repr (when number of rows is above max_rows)..However, in my example the number of rows displayed are the first 5 instead of only 1. By seting
min_rows=2the behaviour is consistent with the doc.Side note: I am unsure if this is really a bug, or a hidden feature that should simply be documented: by setting
min_rows=1I could actually get what I was trying to achieve, i.e., display truncated dataframes by showing the first N rows + "...", instead of breaking into two chunks separated by "...". so, if this is a bug side effect, I would be nice to have it as featureThank you
Expected Behavior
Installed Versions
Details
3.0.1