vice.dataframe.remove¶
Remove an element of the dataframe
Signature: x.remove(key)
New in version 1.1.0.
Parameters¶
- x
dataframe
An instance of this class
- key
str
[case-insensitive] The key to remove from the dataframe
Raises¶
- KeyError
Key is not in the dataframe
Example Code¶
>>> import vice
>>> example = vice.dataframe({
"a": [1, 2, 3],
"b": [4, 5, 6],
"c": [7, 8, 9]})
>>> example
vice.dataframe{
a --------------> [1, 2, 3]
b --------------> [4, 5, 6]
c --------------> [7, 8, 9]
}
>>> example.remove("a")
vice.dataframe{
b --------------> [4, 5, 6]
c --------------> [7, 8, 9]
}
>>> example.remove("b")
vice.dataframe{
c --------------> [7, 8, 9]
}