Skip to content

Commit bc2c1b1

Browse files
drizk1kdpsingh
andauthored
fix sep_rows for all string types (#127)
* fix sep_rows for all string types * fixes `@summary` (#124) * fixes `@summary` * Added support for non-numeric columns, minor tweaks to column names. --------- Co-authored-by: Karandeep Singh <[email protected]> --------- Co-authored-by: Karandeep Singh <[email protected]>
1 parent afdc188 commit bc2c1b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/separate_unite.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ function separate_rows(df::Union{DataFrame, GroupedDataFrame}, columns, delimite
211211
for row in eachrow(temp_df)
212212
value = row[column]
213213
# Handle missing values and non-string types
214-
if ismissing(value) || typeof(value) != String
215-
push!(expanded_data[column], [value])
214+
if ismissing(value) || !(value isa AbstractString)
215+
push!(expanded_data[column], [value])
216216
else
217217
push!(expanded_data[column], split(value, delimiter))
218218
end

0 commit comments

Comments
 (0)