Macro names

using DataFrames, DataFramesMeta, DataFrameMacros

using the above packages I have to preface some macro names with the package name.
I presume this is because the same macro exists in multiple packages.

Is there a way to avoid needing the package name?

@DataFrameMacros.groupby
@DataFramesMeta.combine
@DataFramesMeta.select

You could use the syntax using DataFrames: DataFrame to only include only the bits you need from packages:
https://docs.julialang.org/en/v1/manual/modules/#using-and-import-with-specific-identifiers,-and-adding-methods

See also: Modules · The Julia Language

The problem is maybe that DataFramesMacro and DataFramesMeta are both trying to do similar things. Maybe the best solution is to pick one of them. Or if you only need one function, you could do using DataFrames, DataFramesMeta and using DataFrameMacros: DataFrameMacros as DFM.
Then you could call functions from DataFrameMacros via DFM.@groupby etc.

1 Like