@@ -1023,7 +1023,7 @@ end
10231023
10241024_filter_helper (f, cols... ):: BitVector = ((x... ) -> f (x... ):: Bool ). (cols... )
10251025
1026- @inline function Base. filter ((cols, f):: Pair{<: AsTable} , df:: AbstractDataFrame ;
1026+ @inline function Base. filter ((cols, f):: Pair{AsTable} , df:: AbstractDataFrame ;
10271027 view:: Bool = false )
10281028 df_tmp = select (df, cols. cols, copycols= false )
10291029 if ncol (df_tmp) == 0
@@ -1547,14 +1547,15 @@ Base.vcat(dfs::AbstractDataFrame...;
15471547 AbstractVector{<: AbstractString }}= :setequal ) =
15481548 reduce (vcat, dfs; cols= cols)
15491549
1550- Base. reduce (:: typeof (vcat),
1551- dfs:: Union {AbstractVector{<: AbstractDataFrame },
1552- Tuple{Vararg{AbstractDataFrame}}};
1553- cols:: Union {Symbol, AbstractVector{Symbol},
1554- AbstractVector{<: AbstractString }}= :setequal ) =
1555- _vcat ([df for df in dfs if ncol (df) != 0 ]; cols= cols)
1550+ function Base. reduce (:: typeof (vcat),
1551+ dfs:: Union {AbstractVector{<: AbstractDataFrame },
1552+ Tuple{AbstractDataFrame, Vararg{AbstractDataFrame}}};
1553+ cols:: Union {Symbol, AbstractVector{Symbol},
1554+ AbstractVector{<: AbstractString }}= :setequal )
1555+ return _vcat (AbstractDataFrame[df for df in dfs if ncol (df) != 0 ]; cols= cols)
1556+ end
15561557
1557- function _vcat (dfs:: AbstractVector{<: AbstractDataFrame} ;
1558+ function _vcat (dfs:: AbstractVector{AbstractDataFrame} ;
15581559 cols:: Union {Symbol, AbstractVector{Symbol},
15591560 AbstractVector{<: AbstractString }}= :setequal )
15601561
@@ -1586,13 +1587,15 @@ function _vcat(dfs::AbstractVector{<:AbstractDataFrame};
15861587
15871588 if ! isempty (coldiff)
15881589 # if any DataFrames are a full superset of names, skip them
1589- filter! (u -> ! issetequal (u, header), uniqueheaders)
1590+ let header= header # julia #15276
1591+ filter! (u -> ! issetequal (u, header), uniqueheaders)
1592+ end
15901593 estrings = map (enumerate (uniqueheaders)) do (i, head)
15911594 matching = findall (h -> head == h, allheaders)
15921595 headerdiff = setdiff (coldiff, head)
1593- cols = join (headerdiff, " , " , " and " )
1596+ badcols = join (headerdiff, " , " , " and " )
15941597 args = join (matching, " , " , " and " )
1595- return " column(s) $cols are missing from argument(s) $args "
1598+ return " column(s) $badcols are missing from argument(s) $args "
15961599 end
15971600 throw (ArgumentError (join (estrings, " , " , " , and " )))
15981601 end
0 commit comments