Skip to content

CLN: Assorted #51112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions pandas/_testing/_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
from pandas._typing import NpDtype

RANDS_CHARS = np.array(list(string.ascii_letters + string.digits), dtype=(np.str_, 1))
RANDU_CHARS = np.array(
list("".join(map(chr, range(1488, 1488 + 26))) + string.digits),
dtype=(np.unicode_, 1),
)


def rands_array(nchars, size, dtype: NpDtype = "O", replace: bool = True) -> np.ndarray:
Expand Down
1 change: 0 additions & 1 deletion pandas/tests/io/formats/test_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -3461,7 +3461,6 @@ def test_filepath_or_buffer_arg(
assert_filepath_or_buffer_equals(expected)


@pytest.mark.filterwarnings("ignore::FutureWarning")
@pytest.mark.parametrize("method", ["to_string", "to_html", "to_latex"])
def test_filepath_or_buffer_bad_arg_raises(float_frame, method):
if method in ["to_latex"]: # uses styler implementation
Expand Down
26 changes: 0 additions & 26 deletions pandas/util/_print_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,29 +132,3 @@ def show_versions(as_json: str | bool = False) -> None:
print("")
for k, v in deps.items():
print(f"{k:<{maxlen}}: {v}")


def main() -> int:
from optparse import OptionParser

parser = OptionParser()
parser.add_option(
"-j",
"--json",
metavar="FILE",
nargs=1,
help="Save output as JSON into file, pass in '-' to output to stdout",
)

(options, args) = parser.parse_args()

if options.json == "-":
options.json = True

show_versions(as_json=options.json)

return 0


if __name__ == "__main__":
sys.exit(main())