Find empty or NaN entry in Pandas Dataframe

np.where(pd.isnull(df)) returns the row and column indices where the value is NaN: In [152]: import numpy as np In [153]: import pandas as pd In [154]: np.where(pd.isnull(df)) Out[154]: (array([2, 5, 6, 6, 7, 7]), array([7, 7, 6, 7, 6, 7])) In [155]: df.iloc[2,7] Out[155]: nan In [160]: [df.iloc[i,j] for i,j in zip(*np.where(pd.isnull(df)))] Out[160]: [nan, nan, … Read more

Erlang lists with single numbers over 8?

String is not a data type in Erlang, it’s just a list of integers. But Erlang shell try to display lists as strings if possible: 1> S = [65, 66, 67, 68, 69, 70]. “ABCDEF” 2> S = “ABCDEF”. “ABCDEF” 3> io:write(S). [65,66,67,68,69,70]ok 4> [65, 66]. “AB” 5> [65, 66, 1]. [65,66,1]

List.shuffle() in Dart?

There is a shuffle method in the List class. The methods shuffles the list in place. You can call it without an argument or provide a random number generator instance: var list = [‘a’, ‘b’, ‘c’, ‘d’]; list.shuffle(); print(‘$list’); The collection package comes with a shuffle function/extension that also supports specifying a sub range to … Read more