All string operations are valid for both scalars and columns.

StringValue

StringValue(self, arg)

Methods

NameDescription
ascii_strReturn the numeric ASCII code of the first character of a string.
authorityParse a URL and extract authority.
capitalizeUppercase the first letter, lowercase the rest.
concatConcatenate strings.
containsReturn whether the expression contains substr.
endswithDetermine if self ends with end.
findReturn the position of the first occurrence of substring.
find_in_setFind the first occurrence of str_list within a list of strings.
fragmentParse a URL and extract fragment identifier.
hostParse a URL and extract host.
lengthCompute the length of a string.
levenshteinReturn the Levenshtein distance between two strings.
lowerConvert string to all lowercase.
lpadPad arg by truncating on the right or padding on the left.
lstripRemove whitespace from the left side of string.
pathParse a URL and extract path.
protocolParse a URL and extract protocol.
queryParse a URL and returns query string or query string parameter.
re_extractReturn the specified match at index from a regex pattern.
re_replaceReplace all matches found by regex pattern with replacement.
re_searchReturn whether the values match pattern.
re_splitSplit a string by a regular expression pattern.
repeatRepeat a string n times.
replaceReplace each exact match of pattern with replacement.
reverseReverse the characters of a string.
rightReturn up to nchars from the end of each string.
rpadPad self by truncating or padding on the right.
rstripRemove whitespace from the right side of string.
splitSplit as string on delimiter.
startswithDetermine whether self starts with start.
stripRemove whitespace from left and right sides of a string.
substrExtract a substring.
to_date
translateReplace from_str characters in self characters in to_str.
upperConvert string to all uppercase.
userinfoParse a URL and extract user info.

ascii_str

ascii_str()

Return the numeric ASCII code of the first character of a string.

Returns

NameTypeDescription
IntegerValueASCII code of the first character of the input

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["abc", "def", "ghi"]})
>>> t.s.ascii_str()
┏━━━━━━━━━━━━━━━━┓
┃ StringAscii(s)
┡━━━━━━━━━━━━━━━━┩
│ int32          │
├────────────────┤
97
100
103
└────────────────┘

authority

authority()

Parse a URL and extract authority.

Examples

>>> import ibis
>>> url = ibis.literal("https://user:pass@example.com:80/docs/books")
>>> result = url.authority()  # user:pass@example.com:80

Returns

NameTypeDescription
StringValueExtracted string value

capitalize

capitalize()

Uppercase the first letter, lowercase the rest.

This API matches the semantics of the Python method.

Returns

NameTypeDescription
StringValueCapitalized string

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["aBC", " abc", "ab cd", None]})
>>> t.s.capitalize()
┏━━━━━━━━━━━━━━━┓
┃ Capitalize(s)
┡━━━━━━━━━━━━━━━┩
│ string        │
├───────────────┤
│ Abc           │
│  abc          │
│ Ab cd         │
│ NULL          │
└───────────────┘

concat

concat(other, *args)

Concatenate strings.

NULLs are propagated. This methods is equivalent to using the + operator.

Parameters

NameTypeDescriptionDefault
otherstr | StringValueString to concatenaterequired
argsstr | StringValueAdditional strings to concatenate()

Returns

NameTypeDescription
StringValueAll strings concatenated

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["abc", None]})
>>> t.s.concat("xyz", "123")
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ StringConcat((s, 'xyz', '123'))
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ string                          │
├─────────────────────────────────┤
│ abcxyz123                       │
│ NULL                            │
└─────────────────────────────────┘
>>> t.s + "xyz"
┏━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ StringConcat((s, 'xyz'))
┡━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ string                   │
├──────────────────────────┤
│ abcxyz                   │
│ NULL                     │
└──────────────────────────┘

contains

contains(substr)

Return whether the expression contains substr.

Parameters

NameTypeDescriptionDefault
substrstr | StringValueSubstring for which to checkrequired

Returns

NameTypeDescription
BooleanValueBoolean indicating the presence of substr in the expression

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["bab", "ddd", "eaf"]})
>>> t.s.contains("a")
┏━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ StringContains(s, 'a')
┡━━━━━━━━━━━━━━━━━━━━━━━━┩
│ boolean                │
├────────────────────────┤
True
False
True
└────────────────────────┘

endswith

endswith(end)

Determine if self ends with end.

Parameters

NameTypeDescriptionDefault
endstr | StringValueSuffix to check forrequired

Returns

NameTypeDescription
BooleanValueBoolean indicating whether self ends with end

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["Ibis project", "GitHub"]})
>>> t.s.endswith("project")
┏━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ EndsWith(s, 'project')
┡━━━━━━━━━━━━━━━━━━━━━━━━┩
│ boolean                │
├────────────────────────┤
True
False
└────────────────────────┘

find

find(substr, start=None, end=None)

Return the position of the first occurrence of substring.

Parameters

NameTypeDescriptionDefault
substrstr | StringValueSubstring to search forrequired
startint | ir.IntegerValue | NoneZero based index of where to start the searchNone
endint | ir.IntegerValue | NoneZero based index of where to stop the search. Currently not implemented.None

Returns

NameTypeDescription
IntegerValuePosition of substr in arg starting from start

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["abc", "bac", "bca"]})
>>> t.s.find("a")
┏━━━━━━━━━━━━━━━━━━━━┓
┃ StringFind(s, 'a')
┡━━━━━━━━━━━━━━━━━━━━┩
│ int64              │
├────────────────────┤
0
1
2
└────────────────────┘
>>> t.s.find("z")
┏━━━━━━━━━━━━━━━━━━━━┓
┃ StringFind(s, 'z')
┡━━━━━━━━━━━━━━━━━━━━┩
│ int64              │
├────────────────────┤
-1
-1
-1
└────────────────────┘

find_in_set

find_in_set(str_list)

Find the first occurrence of str_list within a list of strings.

No string in str_list can have a comma.

Parameters

NameTypeDescriptionDefault
str_listSequence[str]Sequence of stringsrequired

Returns

NameTypeDescription
IntegerValuePosition of str_list in self. Returns -1 if self isn’t found or if self contains ','.

Examples

>>> import ibis
>>> table = ibis.table(dict(string_col="string"))
>>> result = table.string_col.find_in_set(["a", "b"])

fragment

fragment()

Parse a URL and extract fragment identifier.

Examples

>>> import ibis
>>> url = ibis.literal("https://example.com:80/docs/#DOWNLOADING")
>>> result = url.fragment()  # DOWNLOADING

Returns

NameTypeDescription
StringValueExtracted string value

host

host()

Parse a URL and extract host.

Examples

>>> import ibis
>>> url = ibis.literal("https://user:pass@example.com:80/docs/books")
>>> result = url.host()  # example.com

Returns

NameTypeDescription
StringValueExtracted string value

length

length()

Compute the length of a string.

Returns

NameTypeDescription
IntegerValueThe length of each string in the expression

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["aaa", "a", "aa"]})
>>> t.s.length()
┏━━━━━━━━━━━━━━━━━┓
┃ StringLength(s)
┡━━━━━━━━━━━━━━━━━┩
│ int32           │
├─────────────────┤
3
1
2
└─────────────────┘

levenshtein

levenshtein(other)

Return the Levenshtein distance between two strings.

Parameters

NameTypeDescriptionDefault
otherStringValueString to compare torequired

Returns

NameTypeDescription
IntegerValueThe edit distance between the two strings

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> s = ibis.literal("kitten")
>>> s.levenshtein("sitting")
┌───┐
3
└───┘

lower

lower()

Convert string to all lowercase.

Returns

NameTypeDescription
StringValueLowercase string

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["AAA", "a", "AA"]})
>>> t
┏━━━━━━━━┓
┃ s      ┃
┡━━━━━━━━┩
│ string │
├────────┤
│ AAA    │
│ a      │
│ AA     │
└────────┘
>>> t.s.lower()
┏━━━━━━━━━━━━━━┓
┃ Lowercase(s)
┡━━━━━━━━━━━━━━┩
│ string       │
├──────────────┤
│ aaa          │
│ a            │
│ aa           │
└──────────────┘

lpad

lpad(length, pad=' ')

Pad arg by truncating on the right or padding on the left.

Parameters

NameTypeDescriptionDefault
lengthint | ir.IntegerValueLength of output stringrequired
padstr | StringValuePad character' '

Returns

NameTypeDescription
StringValueLeft-padded string

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["abc", "def", "ghij"]})
>>> t.s.lpad(5, "-")
┏━━━━━━━━━━━━━━━━━┓
┃ LPad(s, 5, '-')
┡━━━━━━━━━━━━━━━━━┩
│ string          │
├─────────────────┤
--abc           │
--def
-ghij           │
└─────────────────┘

lstrip

lstrip()

Remove whitespace from the left side of string.

Returns

NameTypeDescription
StringValueLeft-stripped string

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["\ta\t", "\nb\n", "\vc\t"]})
>>> t
┏━━━━━━━━┓
┃ s      ┃
┡━━━━━━━━┩
│ string │
├────────┤
│ \ta\t  │
│ \nb\n  │
│ \vc\t  │
└────────┘
>>> t.s.lstrip()
┏━━━━━━━━━━━┓
┃ LStrip(s)
┡━━━━━━━━━━━┩
│ string    │
├───────────┤
│ a\t       │
│ b\n       │
│ c\t       │
└───────────┘

path

path()

Parse a URL and extract path.

Examples

>>> import ibis
>>> url = ibis.literal(
...     "https://example.com:80/docs/books/tutorial/index.html?name=networking"
... )
>>> result = url.path()  # docs/books/tutorial/index.html

Returns

NameTypeDescription
StringValueExtracted string value

protocol

protocol()

Parse a URL and extract protocol.

Examples

>>> import ibis
>>> url = ibis.literal("https://user:pass@example.com:80/docs/books")
>>> result = url.protocol()  # https

Returns

NameTypeDescription
StringValueExtracted string value

query

query(key=None)

Parse a URL and returns query string or query string parameter.

If key is passed, return the value of the query string parameter named. If key is absent, return the query string.

Parameters

NameTypeDescriptionDefault
keystr | StringValue | NoneQuery component to extractNone

Examples

>>> import ibis
>>> url = ibis.literal(
...     "https://example.com:80/docs/books/tutorial/index.html?name=networking"
... )
>>> result = url.query()  # name=networking
>>> query_name = url.query("name")  # networking

Returns

NameTypeDescription
StringValueExtracted string value

re_extract

re_extract(pattern, index)

Return the specified match at index from a regex pattern.

Parameters

NameTypeDescriptionDefault
patternstr | StringValueRegular expression pattern stringrequired
indexint | ir.IntegerValueThe index of the match group to return. The behavior of this function follows the behavior of Python’s match objects: when index is zero and there’s a match, return the entire match, otherwise return the content of the index-th match group.required

Returns

NameTypeDescription
StringValueExtracted match or whole string if index is zero

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["abc", "bac", "bca"]})

Extract a specific group

>>> t.s.re_extract(r"^(a)bc", 1)
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ RegexExtract(s, '^(a)bc', 1)
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ string                       │
├──────────────────────────────┤
│ a                            │
~
~
└──────────────────────────────┘

Extract the entire match

>>> t.s.re_extract(r"^(a)bc", 0)
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ RegexExtract(s, '^(a)bc', 0)
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ string                       │
├──────────────────────────────┤
│ abc                          │
~
~
└──────────────────────────────┘

re_replace

re_replace(pattern, replacement)

Replace all matches found by regex pattern with replacement.

Parameters

NameTypeDescriptionDefault
patternstr | StringValueRegular expression stringrequired
replacementstr | StringValueReplacement string or regular expressionrequired

Returns

NameTypeDescription
StringValueModified string

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["abc", "bac", "bca", "this has  multi \t whitespace"]})
>>> s = t.s

Replace all “a”s that are at the beginning of the string with “b”:

>>> s.re_replace("^a", "b")
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ RegexReplace(s, '^a', 'b')
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ string                        │
├───────────────────────────────┤
│ bbc                           │
│ bac                           │
│ bca                           │
│ this has  multi \t whitespace │
└───────────────────────────────┘

Double up any “a”s or “b”s, using capture groups and backreferences:

>>> s.re_replace("([ab])", r"\0\0")
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ RegexReplace(s, '()', '\\0\\0')
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ string                              │
├─────────────────────────────────────┤
│ aabbc                               │
│ bbaac                               │
│ bbcaa                               │
│ this haas  multi \t whitespaace     │
└─────────────────────────────────────┘

Normalize all whitespace to a single space:

>>> s.re_replace(r"\s+", " ")
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ RegexReplace(s, '\\s+', ' ')
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ string                       │
├──────────────────────────────┤
│ abc                          │
│ bac                          │
│ bca                          │
│ this has multi whitespace    │
└──────────────────────────────┘
re_search(pattern)

Return whether the values match pattern.

Returns True if the regex matches a string and False otherwise.

Parameters

NameTypeDescriptionDefault
patternstr | StringValueRegular expression use for searchingrequired

Returns

NameTypeDescription
BooleanValueIndicator of matches

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["Ibis project", "GitHub"]})
>>> t.s.re_search(".+Hub")
┏━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ RegexSearch(s, '.+Hub')
┡━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ boolean                 │
├─────────────────────────┤
False
True
└─────────────────────────┘

re_split

re_split(pattern)

Split a string by a regular expression pattern.

Parameters

NameTypeDescriptionDefault
patternstr | StringValueRegular expression string to split byrequired

Returns

NameTypeDescription
ArrayValueArray of strings from splitting by pattern

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable(dict(s=["a.b", "b.....c", "c.........a", "def"]))
>>> t.s
┏━━━━━━━━━━━━━┓
┃ s           ┃
┡━━━━━━━━━━━━━┩
│ string      │
├─────────────┤
│ a.b         │
│ b.....c     │
│ c.........a │
def
└─────────────┘
>>> t.s.re_split(r"\.+").name("splits")
┏━━━━━━━━━━━━━━━━━━━━━━┓
┃ splits               ┃
┡━━━━━━━━━━━━━━━━━━━━━━┩
│ array<string>
├──────────────────────┤
['a', 'b']
['b', 'c']
['c', 'a']
['def']
└──────────────────────┘

repeat

repeat(n)

Repeat a string n times.

Parameters

NameTypeDescriptionDefault
nint | ir.IntegerValueNumber of repetitionsrequired

Returns

NameTypeDescription
StringValueRepeated string

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["a", "bb", "c"]})
>>> t.s.repeat(5)
┏━━━━━━━━━━━━━━┓
┃ Repeat(s, 5)
┡━━━━━━━━━━━━━━┩
│ string       │
├──────────────┤
│ aaaaa        │
│ bbbbbbbbbb   │
│ ccccc        │
└──────────────┘

replace

replace(pattern, replacement)

Replace each exact match of pattern with replacement.

Parameters

NameTypeDescriptionDefault
patternStringValueString patternrequired
replacementStringValueString replacementrequired

Returns

NameTypeDescription
StringValueReplaced string

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["abc", "bac", "bca"]})
>>> t.s.replace("b", "z")
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ StringReplace(s, 'b', 'z')
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ string                     │
├────────────────────────────┤
│ azc                        │
│ zac                        │
│ zca                        │
└────────────────────────────┘

reverse

reverse()

Reverse the characters of a string.

Returns

NameTypeDescription
StringValueReversed string

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["abc", "def", "ghi"]})
>>> t
┏━━━━━━━━┓
┃ s      ┃
┡━━━━━━━━┩
│ string │
├────────┤
│ abc    │
def
│ ghi    │
└────────┘
>>> t.s.reverse()
┏━━━━━━━━━━━━┓
┃ Reverse(s)
┡━━━━━━━━━━━━┩
│ string     │
├────────────┤
│ cba        │
│ fed        │
│ ihg        │
└────────────┘
right(nchars)

Return up to nchars from the end of each string.

Parameters

NameTypeDescriptionDefault
ncharsint | ir.IntegerValueMaximum number of characters to returnrequired

Returns

NameTypeDescription
StringValueCharacters from the end

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["abc", "defg", "hijlk"]})
>>> t.s.right(2)
┏━━━━━━━━━━━━━━━━┓
┃ StrRight(s, 2)
┡━━━━━━━━━━━━━━━━┩
│ string         │
├────────────────┤
│ bc             │
│ fg             │
│ lk             │
└────────────────┘

rpad

rpad(length, pad=' ')

Pad self by truncating or padding on the right.

Parameters

NameTypeDescriptionDefault
selfString to padrequired
lengthint | ir.IntegerValueLength of output stringrequired
padstr | StringValuePad character' '

Returns

NameTypeDescription
StringValueRight-padded string

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["abc", "def", "ghij"]})
>>> t.s.rpad(5, "-")
┏━━━━━━━━━━━━━━━━━┓
┃ RPad(s, 5, '-')
┡━━━━━━━━━━━━━━━━━┩
│ string          │
├─────────────────┤
│ abc--
def--
│ ghij-
└─────────────────┘

rstrip

rstrip()

Remove whitespace from the right side of string.

Returns

NameTypeDescription
StringValueRight-stripped string

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["\ta\t", "\nb\n", "\vc\t"]})
>>> t
┏━━━━━━━━┓
┃ s      ┃
┡━━━━━━━━┩
│ string │
├────────┤
│ \ta\t  │
│ \nb\n  │
│ \vc\t  │
└────────┘
>>> t.s.rstrip()
┏━━━━━━━━━━━┓
┃ RStrip(s)
┡━━━━━━━━━━━┩
│ string    │
├───────────┤
│ \ta       │
│ \nb       │
│ \vc       │
└───────────┘

split

split(delimiter)

Split as string on delimiter.

This API only works on backends with array support.

Parameters

NameTypeDescriptionDefault
delimiterstr | StringValueValue to split byrequired

Returns

NameTypeDescription
ArrayValueThe string split by delimiter

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"col": ["a,b,c", "d,e", "f"]})
>>> t
┏━━━━━━━━┓
┃ col    ┃
┡━━━━━━━━┩
│ string │
├────────┤
│ a,b,c  │
│ d,e    │
│ f      │
└────────┘
>>> t.col.split(",")
┏━━━━━━━━━━━━━━━━━━━━━━━┓
┃ StringSplit(col, ',')
┡━━━━━━━━━━━━━━━━━━━━━━━┩
│ array<string>
├───────────────────────┤
['a', 'b', ... +1]
['d', 'e']
['f']
└───────────────────────┘

startswith

startswith(start)

Determine whether self starts with start.

Parameters

NameTypeDescriptionDefault
startstr | StringValueprefix to check forrequired

Returns

NameTypeDescription
BooleanValueBoolean indicating whether self starts with start

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["Ibis project", "GitHub"]})
>>> t.s.startswith("Ibis")
┏━━━━━━━━━━━━━━━━━━━━━━━┓
┃ StartsWith(s, 'Ibis')
┡━━━━━━━━━━━━━━━━━━━━━━━┩
│ boolean               │
├───────────────────────┤
True
False
└───────────────────────┘

strip

strip()

Remove whitespace from left and right sides of a string.

Returns

NameTypeDescription
StringValueStripped string

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["\ta\t", "\nb\n", "\vc\t"]})
>>> t
┏━━━━━━━━┓
┃ s      ┃
┡━━━━━━━━┩
│ string │
├────────┤
│ \ta\t  │
│ \nb\n  │
│ \vc\t  │
└────────┘
>>> t.s.strip()
┏━━━━━━━━━━┓
┃ Strip(s)
┡━━━━━━━━━━┩
│ string   │
├──────────┤
│ a        │
│ b        │
│ c        │
└──────────┘

substr

substr(start, length=None)

Extract a substring.

Parameters

NameTypeDescriptionDefault
startint | ir.IntegerValueFirst character to start splitting, indices start at 0required
lengthint | ir.IntegerValue | NoneMaximum length of each substring. If not supplied, searches the entire stringNone

Returns

NameTypeDescription
StringValueFound substring

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["abc", "defg", "hijlk"]})
>>> t.s.substr(2)
┏━━━━━━━━━━━━━━━━━┓
┃ Substring(s, 2)
┡━━━━━━━━━━━━━━━━━┩
│ string          │
├─────────────────┤
│ c               │
│ fg              │
│ jlk             │
└─────────────────┘

to_date

to_date(format_str)

translate

translate(from_str, to_str)

Replace from_str characters in self characters in to_str.

To avoid unexpected behavior, from_str should be shorter than to_str.

Parameters

NameTypeDescriptionDefault
from_strStringValueCharacters in arg to replacerequired
to_strStringValueCharacters to use for replacementrequired

Returns

NameTypeDescription
StringValueTranslated string

Examples

>>> import ibis
>>> table = ibis.table(dict(string_col="string"))
>>> result = table.string_col.translate("a", "b")

upper

upper()

Convert string to all uppercase.

Returns

NameTypeDescription
StringValueUppercase string

Examples

>>> import ibis
>>> ibis.options.interactive = True
>>> t = ibis.memtable({"s": ["aaa", "A", "aa"]})
>>> t
┏━━━━━━━━┓
┃ s      ┃
┡━━━━━━━━┩
│ string │
├────────┤
│ aaa    │
│ A      │
│ aa     │
└────────┘
>>> t.s.upper()
┏━━━━━━━━━━━━━━┓
┃ Uppercase(s)
┡━━━━━━━━━━━━━━┩
│ string       │
├──────────────┤
│ AAA          │
│ A            │
│ AA           │
└──────────────┘

userinfo

userinfo()

Parse a URL and extract user info.

Examples

>>> import ibis
>>> url = ibis.literal("https://user:pass@example.com:80/docs/books")
>>> result = url.userinfo()  # user:pass

Returns

NameTypeDescription
StringValueExtracted string value