/pycones

Primary LanguagePython

pycones

PyPI Version

...

basic utils

  • flatten a list
flatten([1, 2, [3, [4, 5]]])
# [1, 2, 3, 4, 5]
  • join lists into a string
list_join(list("abc"), list("def"), sep=",")
# "a,b,c,d,e,f"
  • switch jupyter kernel into python or r
nb_kernel_switch(notebook_path, kernel='python')
  • round a number to significant digits
signif_number(1.232, 2)
  • concat two lists with None tolerance
concat_list([1,2,3], None)

concat_list([1,2,3], [4,5,6])