<#1209 Use pd.concat instead because df.append is ...
# flyte-github
a
#1209 Use pd.concat instead because df.append is deprecated Pull request opened by thomasjpfan
pd.concat
is deprecated in pandas
1.X
and was removed in
2.0
. XREF: pandas-dev/pandas#35407
pd.concat
does not error if the columns do not match. It results in nan values:
Copy code
import pandas as pd

df1 = pd.DataFrame(data={"col1": [10, 2], "col2": [10, 4]})
df2 = pd.DataFrame(data={"col3": [5, 10], "col4": [5, 10]})

print(pd.concat([df1, df2]).to_markdown())
flyteorg/flytesnacks GitHub Actions: Serialize & Register Flytesnacks workflow / Serialize Example (examples/whylogs_plugin) GitHub Actions: Serialize & Register Flytesnacks workflow / Serialize Example (examples/sql_plugin) GitHub Actions: Serialize & Register Flytesnacks workflow / Serialize Example (examples/snowflake_plugin) GitHub Actions: Serialize & Register Flytesnacks workflow / Serialize Example (examples/sagemaker_training_plugin) GitHub Actions: Build & Push Example Image to GHCR (examples/whylogs_plugin) GitHub Actions: Serialize & Register Flytesnacks workflow / Serialize Example (examples/sagemaker_pytorch_plugin) GitHub Actions: Build & Push Example Image to GHCR (examples/sql_plugin) GitHub Actions: Serialize & Register Flytesnacks workflow / Serialize Example (examples/ray_plugin) GitHub Actions: Build & Push Example Image to GHCR (examples/snowflake_plugin) GitHub Actions: Serialize & Register Flytesnacks workflow / Serialize Example (examples/productionizing) GitHub Actions: Build & Push Example Image to GHCR (examples/sagemaker_training_plugin) GitHub Actions: Serialize & Register Flytesnacks workflow / Serialize Example (examples/pima_diabetes) GitHub Actions: Build & Push Example Image to GHCR (examples/sagemaker_pytorch_plugin) GitHub Actions: Serialize & Register Flytesnacks workflow / Serialize Example (examples/papermill_plugin) GitHub Actions: Build & Push Example Image to GHCR (examples/ray_plugin) GitHub Actions: Serialize & Register Flytesnacks workflow / Serialize Example (examples/pandera_plugin) GitHub Actions: Build & Push Example Image to GHCR (examples/productionizing) GitHub Actions: Serialize & Register Flytesnacks workflow / Serialize Example (examples/onnx_plugin) GitHub Actions: Build & Push Example Image to GHCR (examples/pima_diabetes) GitHub Actions: Serialize & Register Flytesnacks workflow / Serialize Example (examples/nlp_processing) GitHub Actions: Build & Push Example Image to GHCR (examples/papermill_plugin) GitHub Actions: Serialize & Register Flytesnacks workflow / Serialize Example (examples/modin_plugin) GitHub Actions: Build & Push Example Image to GHCR (examples/pandera_plugin) GitHub Actions: Serialize & Register Flytesnacks workflow / Serialize Example (examples/mnist_classifier) GitHub Actions: Build & Push Example Image to GHCR (examples/onnx_plugin) GitHub Actions: Serialize & Register Flytesnacks workflow / Serialize Example (examples/mmcloud_plugin) GitHub Actions: Build & Push Example Image to GHCR (examples/nlp_processing) GitHub Actions: Serialize & Register Flytesnacks workflow / Serialize Example (examples/mlflow_plugin) GitHub Actions: Build & Push Example Image to GHCR (examples/modin_plugin) GitHub Actions: Serialize & Register Flytesnacks workflow / Serialize Example (examples/kftensorflow_plugin) ✅ No checks have passed 0/30 successful checks