Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2021 02:12 AM
I would like to implement a simple logic:
if Df1 is empty return Df2 else newDf = Df1.union(Df2)
May happened that Df1 is empty and the output is simply: []. In that case I do not need union.
I have it like this but getting error when creating dataframe
if len(Df1) == 0:
Df2
else:
newDf=Df1.union(Df2)
Labels:
- Labels:
-
Dataframe