Search found 2 matches

by programmer
27 Mar 2019
Forum: Fixing Errors Python
Topic: Convering dictionary into dataframe pandas python
Replies: 1
Views: 87

Convering dictionary into dataframe pandas python

Hello, I am new to pandas and I have written a code to store different values in the form of key and values pairs. Please have a look at the below code. countries_details = {'name': ['India', 'South Africa', 'Australia'], 'population in crores': [133, 6, 33], 'Best Place to Visit': ['Taj Mahal','Bou...
by programmer
27 Mar 2019
Forum: Fixing Errors Python
Topic: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() | Python
Replies: 1
Views: 61

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() | Python

Hello, I am new to numpy and i am learning numpy from the scratch. I am trying to print some random values using numpy array and trying to select values based on some threshold. Please see the below code import numpy as np array = np.random.rand(3,5) print(array[array>0.5]) It is showing the output ...