claude_plugin/skills/sciris-dicts/SKILL.md
Use when working with Sciris dictionaries or dataframes — sc.odict, sc.objdict, sc.dataframe, integer indexing of dicts, enumitems, object-syntax access, dataframe creation with dtypes, appendrow, or sc.dataframe.cat.
npx skillsauth add sciris/sciris sciris-dictsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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
)
testing
Use when working with Sciris miscellaneous utilities — sc.mergedicts, sc.mergelists, sc.tolist, sc.toarray, sc.isnumber, sc.suggest, sc.download, sc.runcommand, sc.importbypath, sc.loadtext, sc.help, sc.traceback, sc.autolist, sc.pp, or type checking/conversion.
development
Use when printing or formatting output with Sciris — sc.heading, sc.printgreen, sc.printblue, colored output, sc.strjoin, sc.newlinejoin, sc.pr, sc.prettyobj, sc.indent, sc.progressbar, sc.printmedian, or monitoring loop progress.
development
Use when plotting with Sciris or Matplotlib — sc.options, sc.dateformatter, sc.commaticks, sc.SIticks, sc.boxoff, sc.setylim, sc.figlayout, sc.getrowscols, sc.vectocolor, sc.gridcolors, sc.scatter3d, sc.savefig, plot styles (sciris.simple, sciris.fancy), colormaps (parula, orangeblue), or 3D plotting.
development
Use when parallelizing code or profiling performance with Sciris — sc.parallelize, sc.Parallel, iterarg, iterkwargs, maxcpu, maxmem, async parallelization, sc.profile, sc.benchmark, sc.memload, sc.checkram, line profiling, or CPU/memory monitoring.