MCPcopy Index your code
hub / github.com/pathwaycom/pathway / upper

Method upper

python/pathway/internals/expressions/string.py:74–113  ·  view source on GitHub ↗

Returns a uppercase copy of a string. Returns: Uppercase string Example: >>> import pathway as pw >>> table = pw.debug.table_from_markdown( ... ''' ... | name ... 1 | Alice ... 2 | Bob ... 3 | CA

(self)

Source from the content-addressed store, hash-verified

72 )
73
74 def upper(self) -> expr.ColumnExpression:
75 """Returns a uppercase copy of a string.
76
77 Returns:
78 Uppercase string
79
80 Example:
81
82 >>> import pathway as pw
83 >>> table = pw.debug.table_from_markdown(
84 ... '''
85 ... | name
86 ... 1 | Alice
87 ... 2 | Bob
88 ... 3 | CAROLE
89 ... 4 | david
90 ... '''
91 ... )
92 >>> table += table.select(name_upper=table.name.str.upper())
93 >>> pw.debug.compute_and_print(table, include_id=False)
94 name | name_upper
95 Alice | ALICE
96 Bob | BOB
97 CAROLE | CAROLE
98 david | DAVID
99 """
100
101 return expr.MethodCallExpression(
102 (
103 (
104 dt.STR,
105 dt.STR,
106 lambda x: api.Expression.apply(
107 str.upper, x, dtype=dt.STR.to_engine()
108 ),
109 ),
110 ),
111 "str.upper",
112 self._expression,
113 )
114
115 def reversed(self) -> expr.ColumnExpression:
116 """Returns a reverse copy of a string.

Callers 12

_resolve_variableMethod · 0.80
__init__Method · 0.80
generate_docsMethod · 0.80
_is_method_exposedMethod · 0.80
_get_defaultMethod · 0.80
get_table_schemaMethod · 0.80
binlog_availableMethod · 0.80
get_table_schemaMethod · 0.80
innerFunction · 0.80
logicFunction · 0.80
uppercase_logicFunction · 0.80

Calls 2

applyMethod · 0.80
to_engineMethod · 0.45

Tested by 4

innerFunction · 0.64
logicFunction · 0.64
uppercase_logicFunction · 0.64