Python Pandas equivalent to a fill handle for excel? … here is a solution to the problem.
Python Pandas equivalent to a fill handle for excel?
Is there a Pandas function equivalent to MS Excel fill handle?
If multiple cells are selected, it fills down the data or expands a range. My specific application is populated with set values in a specific column in a specific row in a data frame, not necessarily a series.
Solution
This simple function basically meets my requirements. I think it would be nice if ffill could be modified to fill it out like this….
def fill_down(df, col, val, start, end = 0, interval = 1):
if not end:
end = len(df)
for i in range(start,end,interval):
df[col].iloc[i] += val
return df