October 2019
Beginner to intermediate
674 pages
16h 43m
English
In the preceding example, the dictionary consisted of Series as the values in the key-value pair. It is possible to construct a DataFrame with a dictionary of lists instead of a dictionary of Series. Unlike the previous case, the row index will not be defined anywhere in the dictionary. Hence, the row label indices are generated using np.range(n). Therefore, it is crucial in this case for all lists or arrays in the dictionary to be of equal length. If this condition is not met, an error occurs.
The dictionary of lists is defined in the following code:
algos = {'search': ['DFS','BFS','Binary Search','Linear','ShortestPath (Djikstra)'],'sorting': ['Quicksort','Mergesort', 'Heapsort','Bubble Sort', 'Insertion ...Read now
Unlock full access