What is a safer way to expand other packages' function?

You need the namespace: DataFrames.DataFrame(::MyStruct) = ...

2 Likes