I am new to the forum and python. I have been looking all over and may have come across my answer, but can't seem to figure out how to perform a seemingly simple task. Any guidance/hand holding would be really appreciated.
I would like to create a Series in a DataFrame based on conditions from several other columns. From what I can gather, this can be done by creating a function and applying to the Series/DataFrame.
def g(x):
if notnull(f['a']):
f['a']
elif notnull(f['b']):
f['b']
f['c'] = f.apply(x)