from optimus import Optimus op = Optimus("pandas") df = op.create.dataframe({ "words": [" I like fish ", " zombies", "simpsons cat lady", None], "num": [1, 2, 2, 3], "animals": ["dog", "cat", "frog", "eagle"], "thing": ["housé", "tv", "table", "glass"], "two strings": ["cat-car", "dog-tv", "eagle-tv-plus", "lion-pc"], "filter": ["a", "b", "1", "c"], "num 2": ["1", "2", "3", "4"], "col_array": [["baby", "sorry"], ["baby 1", "sorry 1"], ["baby 2", "sorry 2"], ["baby 3", "sorry 3"]], "col_int": [[1, 2, 3], [3, 4], [5, 6, 7], [7, 8]] }) df.display() df = op.create.dataframe({ ("words", "str"): [" I like fish ", " zombies", "simpsons cat lady", None], ("num", "int"): [1, 2, 2, 3], ("animals", "str"): ["dog", "cat", "frog", "eagle"], ("thing", "str"): ["housé", "tv", "table", "glass"], ("two strings", "str"): ["cat-car", "dog-tv", "eagle-tv-plus", "lion-pc"], ("filter", "str"): ["a", "b", "1", "c"], ("num 2", "string"): ["1", "2", "3", "4"], "col_array": [["baby", "sorry"], ["baby 1", "sorry 1"], ["baby 2", "sorry 2"], ["baby 3", "sorry 3"]], "col_int": [[1, 2, 3], [3, 4], [5, 6, 7], [7, 8]] }) df.display() import pandas as pd data = [("bumbl#ebéé ", 17.5, "Espionage", 7), ("Optim'us", 28.0, "Leader", 10), ("ironhide&", 26.0, "Security", 7)] labels = ["names", "height", "function", "rank"] pdf = pd.DataFrame.from_records(data, columns=labels) df = op.create.dataframe(dfd=pdf) df.display() df = op.load.file("https://raw.githubusercontent.com/hi-primus/optimus/develop-21.8/examples/data/foo.csv") df.display() df.display(20) df.print(5) df.display() df.cols.rename("firstName", "name").display(highlight="name") df.cols.upper("lastName").display(highlight="lastName") df.display() df \ .cols.rename("billingId", "billing") \ .cols.drop(["id", "dummyCol"]) \ .cols.append({"zeros": 0}) \ .cols.sort(order="desc") \ .cols.upper("product") \ .display() df.rows.drop_duplicated("product").display() df.set.duplicated("product", "N/A").display(highlight="product") df.profile("*", bins=3) # "*" = select all columns