From sciris
References Sciris odict/objdict for indexed/object-access dicts and enhanced dataframes with dtypes, appendrow, disp, and cat methods.
npx claudepluginhub sciris/scirisThis skill uses the workspace's default tool permissions.
Reference for Sciris container types. See full tutorial: `docs/tutorials/tut_dicts.ipynb`.
Provides code patterns for basic Sciris features: array operations like findinds, date-formatted plotting, objdict containers, object save/load, and parallelization.
Performs pandas DataFrame operations for data analysis, manipulation, cleaning, aggregation, merging, pivoting, time series resampling, and performance optimization.
Guides Polars DataFrame usage in Python/Rust: expressions, lazy evaluation, select/filter/group/join ops, CSV/Parquet I/O for high-performance data analysis workflows.
Share bugs, ideas, or general feedback.
Reference for Sciris container types. See full tutorial: docs/tutorials/tut_dicts.ipynb.
If you need more detail, use your MCP tools (Context7 or GitMCP) to look up current Sciris documentation, or consult the other Sciris skills.
od = sc.odict(a=['some', 'strings'], b=[1, 2, 3])
od['a'] # Key access (like dict)
od[0] # Integer index access
od.keys()[0] # Keys returns a list (not dict_keys)
for i, k, v in od.enumitems(): # Enumerate with key and value
print(f'Item {i}: {k} = {v}')
When NOT to use odict: When your dict has integer keys (ambiguous with index access).
odict vs objdict: odict is slightly faster (nanoseconds per op). Use odict for millions of operations; objdict for everything else.
ob = sc.objdict(key1=[1, 2], key2=[3, 4])
ob.key1 # Object syntax (no quotes!)
ob['key1'] # Dict syntax
ob[0] # Index syntax
# All three are equivalent
# Especially handy in f-strings:
print(f'{ob.key1 = }') # No nested quote issues
# Simpler than pd.DataFrame(dict(x=x, y=y, z=z))
df = sc.dataframe(x=x, y=y, z=z)
# With dtypes
df = sc.dataframe(x=x, y=y, z=z, dtypes=[str, float, bool])
# Columns with types
df = sc.dataframe(columns=dict(x=str, y=float, z=bool), data=data)
df.disp() # Show full dataframe (no truncation)
df.disp(precision=1, ncols=5, nrows=10) # Customized display
df['values', 1] # Column + row access
df[1] # Auto iloc fallback (KeyError in pandas)
df.appendrow(['d', 4, 0]) # Append row in-place
# Concatenate anything
df = sc.dataframe.cat(
sc.dataframe(x=['a'], y=[1]), # Dataframe
dict(x=['b'], y=[2]), # Dict
[['c', 3]], # Raw data
)