
In using pandas, how can I display a table similar to this one.
I think I have to use a dataframe similar to df = pandas.DataFrame(results) and display it with display.display(df) but from there I don't know what to do?
You can pass in a dictionary as data when you use pd.DataFrame:
>>> import pandas as pd
>>> d = {
... 'Algothime': ['KNN', 'SVM', 'MLP'],
... 'Param. 1': ['-', '-', '-'],
... 'Param. 2': ['-', '-', '-'],
... 'Plage param. 1': ['-', '-', '-'],
... 'Plage param. 2': ['-', '-', '-'],
... }
>>> df = pd.DataFrame(data=d)
>>> df
Algothime Param. 1 Param. 2 Plage param. 1 Plage param. 2
0 KNN - - - -
1 SVM - - - -
2 MLP - - - -
If you want that specific style you can use Google Colab or something similar if you don't have Jupyter installed locally:

I recommend looking at this 10 min tutorial.
To answer your question
df = pd.DataFrame(columns=['Algotihme', 'Param. 1', 'Param. 2', 'Plage Param. 1', 'Plage Param. 2' ])
df['Algotihme'] = ['KNN', 'SVM', 'MLP']
df
To display the dataframe simply put 'df' in an empty cell in Jupyter Notebook and run it
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With