question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FAMD: TypeError: cannot concatenate object

See original GitHub issue

Hi! While trying to fit FAMD:

famd = prince.FAMD(n_components=2, n_iter=3, copy=True, check_input=True, engine='auto')
famd = famd.fit(df)

Where df contains the following dtypes:

ip                     object
app                    object
channel                object
DAY(click_time)         int64
YEAR(click_time)        int64
MONTH(click_time)       int64
WEEKDAY(click_time)     int64
users.device           object
users.os               object

Tje object df seems to be of the right type: <class ‘pandas.core.frame.DataFrame’> and its columns also, but I get the following error: TypeError: cannot concatenate object of type “<class ‘scipy.sparse.csr.csr_matrix’>”; only pd.Series, pd.DataFrame, and pd.Panel (deprecated) objs are valid

Does it look like something coming from my side? Or is it a known bug of the libray?

Best,

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Timonzimmcommented, Feb 14, 2019

Awesome thank you, it fixed the problem.

1reaction
MaxHalfordcommented, Feb 14, 2019

Okay I fixed it 😃. It wasn’t much. You can install the latest version which is 0.6.1 and you should be fine. I’ll let you close this issue if everything is working on your side.

Read more comments on GitHub >

github_iconTop Results From Across the Web

append to dataframe raises Error: cannot concatenate object ...
My script takes a photo from folder number two, and compares it to every photo in folder number one. Each comparison produces a...
Read more >
TypeError: cannot concatenate 'str' and 'instancemethod' objects
Hi ! I have a weird issue there. Here's my code : class xml_request(osv.osv): _name = 'xml.request' _columns = { 'config_id': fields.many2one('synconfig', ...
Read more >
What does this Python error mean: “Cannot concatenate 'str ...
You are probably trying to concatenate an object that is a string (text) and an object that is an int (number). For example...
Read more >
Python String Concatenation | DigitalOcean
The biggest issue with + operator is that we can't add any separator or delimiter between strings. For example, if we have to...
Read more >
Query error cannot concatenate 'str' and 'Result' objects
Your error is probably coming from either this code, or something similar: sectorLyr = arcpy.SelectLayerByAttribute_management(lyrCompilVid ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found