I'm trying to generate a new column based on multiple conditions of various columns. My code runs without traceback errors. Below is a snippet of the dataframe and code.
import pandas as pd
import numpy as np
dfc = pd.read_csv(r'C:\\Users\\...01.csv', header='infer')
condition = [dfc['N']==0, dfc['count']==dfc['N'], (dfc['count'] > dfc['N']) & (dfc['N'] != 0)]
rng_result = [str(dfc['i']) + '-' + str(dfc['a']),'None','None to Many']
dfc['rng'] = np.select(condition, rng_result, np.nan)
dfc.to_csv(r'C:\\Users\\...R_01.csv', index=False)
It might be that I don't understand numpy, the middle and last conditions come out fine. The first condition provide an array, which is not wanted. I want a string with the rows 'i' and 'a' value as I typed it below.

