snowflake.snowpark.DataFrame.col_ilike¶
- DataFrame.col_ilike(pattern: str) DataFrame[source]¶
Returns a new DataFrame with only the columns whose names match the specified pattern using case-insensitive ILIKE matching (similar to SELECT * ILIKE ‘pattern’ in SQL).
- Parameters:
pattern – The ILIKE pattern to match column names against. You can use the following wildcards: - Use an underscore (_) to match any single character. - Use a percent sign (%) to match any sequence of zero or more characters. - To match a sequence anywhere within the column name, begin and end the pattern with %.
- Returns:
A new DataFrame containing only columns matching the pattern.
- Return type:
- Raises:
ValueError – If SQL simplifier is not enabled.
SnowparkSQLException – If no columns match the specified pattern.
Examples: