Skip to content

Commit fd7fcfc

Browse files
xinrong-mengIvanK-db
authored andcommitted
[SPARK-49532][DOCS][PS] Improve documentation of "plotting.sample_ratio" option
### What changes were proposed in this pull request? The current documentation incorrectly suggests that "plotting.sample_ratio" **defaults** to "plotting.max_rows". In reality, if "plotting.sample_ratio" is not explicitly set, it is **derived** based on the ratio of "plotting.max_rows" to the dataset size. ### Why are the changes needed? To avoid misunderstandings about how these options interact. ### Does this PR introduce _any_ user-facing change? Doc change only. ### How was this patch tested? Existing tests. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#48013 from xinrong-meng/doc_impr. Authored-by: Xinrong Meng <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
1 parent 76bc2fd commit fd7fcfc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/pyspark/pandas/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,8 @@ def validate(self, v: Any) -> None:
287287
doc=(
288288
"'plotting.sample_ratio' sets the proportion of data that will be plotted for sample-"
289289
"based plots such as `plot.line` and `plot.area`. "
290-
"This option defaults to 'plotting.max_rows' option."
290+
"If not set, it is derived from 'plotting.max_rows', by calculating the ratio of "
291+
"'plotting.max_rows' to the total data size."
291292
),
292293
default=None,
293294
types=(float, type(None)),

0 commit comments

Comments
 (0)