Skip to content

Commit d6afc86

Browse files
authored
DOC towards complying with EX01 specs (#51055)
* DOC towards fixing EX02 errors * DOC Added pandas.Series.copy to funcs to ignore
1 parent 77e97d2 commit d6afc86

File tree

2 files changed

+70
-2
lines changed

2 files changed

+70
-2
lines changed

ci/code_checks.sh

+68-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8383
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX04,GL01,GL02,GL03,GL04,GL05,GL06,GL07,GL09,GL10,PR03,PR04,PR05,PR06,PR08,PR09,PR10,RT01,RT02,RT04,RT05,SA02,SA03,SA04,SS01,SS02,SS03,SS04,SS05,SS06
8484
RET=$(($RET + $?)) ; echo $MSG "DONE"
8585

86-
MSG='Partially validate docstrings (EX01)' ; echo $MSG
86+
MSG='Partially validate docstrings (EX01)' ; echo $MSG
8787
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX01 --ignore_functions \
8888
pandas.Series.index \
8989
pandas.Series.dtype \
@@ -574,7 +574,73 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
574574
pandas.DataFrame.sparse.to_coo \
575575
pandas.DataFrame.to_gbq \
576576
pandas.DataFrame.style \
577-
pandas.DataFrame.__dataframe__ \
577+
pandas.DataFrame.__dataframe__
578+
RET=$(($RET + $?)) ; echo $MSG "DONE"
579+
580+
MSG='Partially validate docstrings (EX02)' ; echo $MSG
581+
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX02 --ignore_functions \
582+
pandas.DataFrame.copy \
583+
pandas.DataFrame.plot.line \
584+
pandas.DataFrame.std \
585+
pandas.DataFrame.var \
586+
pandas.Index.factorize \
587+
pandas.Period.strftime \
588+
pandas.Series.copy \
589+
pandas.Series.factorize \
590+
pandas.Series.floordiv \
591+
pandas.Series.plot.line \
592+
pandas.Series.rfloordiv \
593+
pandas.Series.sparse.density \
594+
pandas.Series.sparse.npoints \
595+
pandas.Series.sparse.sp_values \
596+
pandas.Series.std \
597+
pandas.Series.var \
598+
pandas.Timestamp.fromtimestamp \
599+
pandas.api.types.infer_dtype \
600+
pandas.api.types.is_bool_dtype \
601+
pandas.api.types.is_categorical_dtype \
602+
pandas.api.types.is_complex_dtype \
603+
pandas.api.types.is_datetime64_any_dtype \
604+
pandas.api.types.is_datetime64_dtype \
605+
pandas.api.types.is_datetime64_ns_dtype \
606+
pandas.api.types.is_datetime64tz_dtype \
607+
pandas.api.types.is_dict_like \
608+
pandas.api.types.is_file_like \
609+
pandas.api.types.is_float_dtype \
610+
pandas.api.types.is_hashable \
611+
pandas.api.types.is_int64_dtype \
612+
pandas.api.types.is_integer_dtype \
613+
pandas.api.types.is_interval_dtype \
614+
pandas.api.types.is_iterator \
615+
pandas.api.types.is_list_like \
616+
pandas.api.types.is_named_tuple \
617+
pandas.api.types.is_numeric_dtype \
618+
pandas.api.types.is_object_dtype \
619+
pandas.api.types.is_period_dtype \
620+
pandas.api.types.is_re \
621+
pandas.api.types.is_re_compilable \
622+
pandas.api.types.is_signed_integer_dtype \
623+
pandas.api.types.is_sparse \
624+
pandas.api.types.is_string_dtype \
625+
pandas.api.types.is_timedelta64_dtype \
626+
pandas.api.types.is_timedelta64_ns_dtype \
627+
pandas.api.types.is_unsigned_integer_dtype \
628+
pandas.core.groupby.DataFrameGroupBy.take \
629+
pandas.core.groupby.SeriesGroupBy.take \
630+
pandas.factorize \
631+
pandas.io.formats.style.Styler.concat \
632+
pandas.io.formats.style.Styler.export \
633+
pandas.io.formats.style.Styler.set_td_classes \
634+
pandas.io.formats.style.Styler.use \
635+
pandas.io.json.build_table_schema \
636+
pandas.merge_ordered \
637+
pandas.option_context \
638+
pandas.plotting.andrews_curves \
639+
pandas.plotting.autocorrelation_plot \
640+
pandas.plotting.lag_plot \
641+
pandas.plotting.parallel_coordinates \
642+
pandas.plotting.radviz \
643+
pandas.tseries.frequencies.to_offset
578644
RET=$(($RET + $?)) ; echo $MSG "DONE"
579645

580646
fi

pandas/io/formats/format.py

+2
Original file line numberDiff line numberDiff line change
@@ -2174,6 +2174,8 @@ def set_eng_float_format(accuracy: int = 3, use_eng_prefix: bool = False) -> Non
21742174
2 1.0
21752175
3 1.0k
21762176
4 1.0M
2177+
2178+
>>> pd.set_option("display.float_format", None) # unset option
21772179
"""
21782180
set_option("display.float_format", EngFormatter(accuracy, use_eng_prefix))
21792181

0 commit comments

Comments
 (0)