A PyQT GUI application for converting InfoLease report outputs into Excel files. Handles parsing and summarizing. Learns where files are meant to be store and compiles monthly and yearly summaries.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
InfoLeaseExtract/venv/Lib/site-packages/pandas/tests/frame/test_npfuncs.py

28 lines
853 B

"""
Tests for np.foo applied to DataFrame, not necessarily ufuncs.
"""
import numpy as np
from pandas import (
Categorical,
DataFrame,
)
import pandas._testing as tm
class TestAsArray:
def test_asarray_homogenous(self):
df = DataFrame({"A": Categorical([1, 2]), "B": Categorical([1, 2])})
result = np.asarray(df)
# may change from object in the future
expected = np.array([[1, 1], [2, 2]], dtype="object")
tm.assert_numpy_array_equal(result, expected)
def test_np_sqrt(self, float_frame):
with np.errstate(all="ignore"):
result = np.sqrt(float_frame)
assert isinstance(result, type(float_frame))
assert result.index is float_frame.index
assert result.columns is float_frame.columns
tm.assert_frame_equal(result, float_frame.apply(np.sqrt))