共用方式為


TypeMatcher Class

A column matcher that checks the data type of the column matches.

Inheritance
sempy.functions.matcher._matcher.SeriesMatcher
TypeMatcher

Constructor

TypeMatcher(dtype: Type)

Parameters

Name Description
dtype
Required

The data type required in the column. Date/Time types like Timestamp and datetime64 are normalized into datetime.datetime.

Methods

matches

Check if the column has the expected data type.

matches

Check if the column has the expected data type.

matches(series: MSeries) -> bool

Parameters

Name Description
series
Required

The series the matcher is being tested against.

Returns

Type Description

True if the matcher is met.