-
Notifications
You must be signed in to change notification settings - Fork 199
save_as_csv
not working: "data frame still contains recursive columns!"
#759
Comments
Hi, I assume you tried that several times because a warning or an error should have explained that this function no longer works with the latest output of the rtweet functions. The reason this fails and I didn't decide to flatten the information is explained in this post (basically I found no good way to flatten the nested data in a tweet). There is a specific section explaining how to save the data. You should decide how to flatten your dataset, but I recommend to save it via |
Thanks for your reply, @llrs Yes, you're right: I've tried several times before and I got that warning. I was confused, though, by the message warning and thought there was a typo or some error in the writing. After all, if the functions are not longer working for 1.x, why is this function included in that version? But then, I tried finding info about saving data and didn't find anything on the docs, so thanks for pointing out to this blog post. I did save the dataframe as a RDS object, but this only solves my problem partially, as I wanted to store it into a CSV so I could read it from a different software later. Because of this and the error in the authentication (#756 ) I may revert back to 0.7.0 |
To save it as csv you'll need to decide what to do with the user data, and all the data about entities that each tweet provides. I was thinking for 6 months for such way last time I updated rtweet and I didn't arrive to any good solution or got any proposal. If you find a way to save the output of the function as a flat csv that makes sense I will gladly incorporate it to rtweet and restore the functionality of The authentication error, as far as I know, is a problem on the Twitter side: some users report it works while some others it doesn't. But we can discuss this in the other issue if you have more information. I hope you have a great analysis (by the way, there is a newer version of rtweet with some bugs fixed, you might want to update if you want to keep using rtweet > 0.7 with less bugs). |
thank you so much, Lluís! I have little time for this project, hence my intention to reverting back to the version I used to work with before and used to work for me in previous code, but I'll have to reconsider the strategy and maybe deciding on how to flatten the dataframe. In my case, probably storing multiple values separated by some delimitator, or store values as a vector that I can then expand if needed. but problably none of those approaches make sense, as I do not intend to solve in a minute what you couldn't in six months. |
Oh, understood, familiarity counts. |
Problem
I've retreived some tweets and want to store it in a csv file.
save_as_csv()
andwrite_as_csv()
would fail stating that:Expected behavior
I'd like my dataframe to be flattened and stored in a csv file.
Reproduce the problem
Same goes if I simply try to write a subset of data (i.e.
save_as_csv(head(rt), "rt.csv")
) or if I do another query, so I don't think is about the specific data on my data frame.rtweet version
‘1.1.0’
Session info
The text was updated successfully, but these errors were encountered: