spkit.utils.pretty_print

spkit.utils.pretty_print(List, n=3, sep='|\t', show_index=True, trimLength=None)

Print list : in pretty way

Displaying list with index and in columns-wise

Parameters:
List: list of str
  • list of str

n: int, default=3
  • number of columns

sep: default=’|t’
  • seperator of the columns

show_index: bool, default=True
  • show index or not

trimLength: int, default=None,
  • triming the str of each item in list to look good

Returns:
display: show list

Examples

>>> #sp.utils.pretty_print
>>> import time
>>> import numpy as np
>>> import spkit as sp
>>> Ch_Names = list(sp.eeg.presets.standard_1020_ch)[:50]
>>> sp.utils.pretty_print(Ch_Names, n=5)
    0 LPA  |        1 RPA  |        2 Nz   |        3 Fp1  |        4 Fpz  
    5 Fp2  |        6 AF9  |        7 AF7  |        8 AF5  |        9 AF3  
    10 AF1 |        11 AFz |        12 AF2 |        13 AF4 |        14 AF6 
    15 AF8 |        16 AF10|        17 F9  |        18 F7  |        19 F5  
    20 F3  |        21 F1  |        22 Fz  |        23 F2  |        24 F4  
    25 F6  |        26 F8  |        27 F10 |        28 FT9 |        29 FT7 
    30 FC5 |        31 FC3 |        32 FC1 |        33 FCz |        34 FC2 
    35 FC4 |        36 FC6 |        37 FT8 |        38 FT10|        39 T9  
    40 T7  |        41 C5  |        42 C3  |        43 C1  |        44 Cz  
    45 C2  |        46 C4  |        47 C6  |        48 T8  |        49 T10 
>>> sp.utils.pretty_print(Ch_Names, n=3)
    LPA |   RPA |   Nz  
    Fp1 |   Fpz |   Fp2 
    AF9 |   AF7 |   AF5 
    AF3 |   AF1 |   AFz 
    AF2 |   AF4 |   AF6 
    AF8 |   AF10|   F9  
    F7  |   F5  |   F3  
    F1  |   Fz  |   F2  
    F4  |   F6  |   F8  
    F10 |   FT9 |   FT7 
    FC5 |   FC3 |   FC1 
    FCz |   FC2 |   FC4 
    FC6 |   FT8 |   FT10
    T9  |   T7  |   C5  
    C3  |   C1  |   Cz  
    C2  |   C4  |   C6  
    T8  |   T10 

Examples using spkit.utils.pretty_print

ATAR Algorithm with MNE RAW Object

ATAR Algorithm with MNE RAW Object

EEG Data from EDF File

EEG Data from EDF File