astronomy-commons / lsdb

Large Survey DataBase
https://lsdb.io
BSD 3-Clause "New" or "Revised" License
19 stars 5 forks source link

Return empty margin catalog instead of None with from_dataframe #419

Open hombit opened 2 months ago

hombit commented 2 months ago

Bug report

from_dataframe() should assign empty margin catalog instead of None when margin is empty. Originated from this discussion: https://github.com/astronomy-commons/lsdb/issues/416#issuecomment-2359150932

It looks like it is the similar to #329

Before submitting Please check the following:

hombit commented 6 days ago

A reproducible example

import pandas as pd
from lsdb import from_dataframe

# Fails
assert from_dataframe(pd.DataFrame({'ra': [1.0], 'dec': [1.0]})).margin is not None