Skip to content

Commit

Permalink
Replacing append with concat (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
LSYS committed Apr 6, 2023
1 parent aab2b7d commit 55462d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion forestplot/dataframe_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def reverse_dataframe(dataframe: pd.core.frame.DataFrame) -> pd.core.frame.DataF
def insert_empty_row(dataframe: pd.core.frame.DataFrame) -> pd.core.frame.DataFrame:
"""Add an empty row to the top of the dataframe."""
_df = pd.DataFrame([[np.nan] * len(dataframe.columns)], columns=dataframe.columns)
dataframe = _df.append(dataframe, ignore_index=True)
dataframe = pd.concat([_df, dataframe], axis=0, ignore_index=True)
return dataframe


Expand Down

0 comments on commit 55462d1

Please sign in to comment.