df = data[data.select_dtypes(include = [np.number]).ge(0).all(1)]
df
When the DataFrame consists of Obejct, float, and DateTime, we can use "select_dtypes" to handle only numeric columns.
'둘 > [ Python ]' 카테고리의 다른 글
Layer ModuleWrapper has arguments in `__init__` and therefore must override `get_config` (0) | 2022.07.05 |
---|---|
ImportError: IProgress not found (0) | 2022.07.04 |
Generate Time Index using Python (0) | 2022.03.25 |
Get a List of all Column Names in Pandas DataFrame (0) | 2021.12.14 |
Kernel Density Estimation (0) | 2021.11.03 |