Skip to content

Commit

Permalink
Set np printoptions (apache#32539)
Browse files Browse the repository at this point in the history
  • Loading branch information
Abacn authored and reeba212 committed Dec 4, 2024
1 parent bff7a47 commit 86d6214
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sdks/python/apache_beam/dataframe/doctests.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,10 @@ def set_pandas_options():
# See
# https://github.com/pandas-dev/pandas/blob/a00202d12d399662b8045a8dd3fdac04f18e1e55/doc/source/conf.py#L319
np.random.seed(123456)
np.set_printoptions(precision=4, suppress=True)
legacy = None
if np.version.version.startswith('2'):
legacy = '1.25'
np.set_printoptions(precision=4, suppress=True, legacy=legacy)
pd.options.display.max_rows = 15


Expand Down

0 comments on commit 86d6214

Please sign in to comment.