Teichlab / cellphonedb

MIT License
339 stars 105 forks source link

Creating an empty dataframe #276

Closed simon-spier0 closed 3 years ago

simon-spier0 commented 3 years ago

An empty dataframe can't be created because this error is raised when I try it: AttributeError: type object 'object' has no attribute 'dtype'

column_names = ["a", "b", "c"]
df = pd.DataFrame([], columns=column_names)

Based on this, it's caused by numpy version. If I install numpy 1.19.5, empty dataframe is created but if I install numpy 1.20.0 (or newer), the error above is raised.

Can this bug be fixed in pandas or in numpy?

Thank you.

simon-spier0 commented 3 years ago

I mistook repository. Sorry. :)