Post

Replies

Boosts

Views

Activity

Reply to Save DataFrames as CSVs
Thanks very much. Re merging all the CSVs in a folder, I managed to get this to work some of the time. However, in certain situations (when testing a different subset of the CSVs), I encountered the following error (on a Xcode Playground). "error: Execution was interrupted, reason: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0). The process has been left at the point where it was interrupted, use "thread return -x" to return to the state before expression evaluation." If it is possible to see some example code (and receive guidance on the above error) to help, that would be much appreciated. I also noticed the following warning: 'init(fileURLWithPath:)' will be deprecated in a future version of macOS. Use init(filePath:directoryHint:relativeTo:) instead. As such, I used filePath rather than fileURLWithPath. Thanks again.
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’22
Reply to Save DataFrames as CSVs
Thanks very much. That was really helpful.  (For awareness, I received an error for a particular folder - Error Domain=NSPOSIXErrorDomain Code=2 “No such file or directory”, which threw me slightly but the code worked fine on other folders.)  As you mentioned, URL(fileURLWithPath:) was useful for a quick test. I’d also be very grateful for specific guidance on targeting iOS. Re merging CSVs/the append method. Thanks again. I can now merge CSVs. However, my current code is not very efficient. For context, I am looking to merge over 40 CSVs. Is there an efficient way to merge all the CSV files within a folder? Thanks
Topic: Programming Languages SubTopic: Swift Tags:
Nov ’22
Reply to Save DataFrames as CSVs
Hi Many thanks for responding.  Apologies, I appreciate this will be straightforward but I seem to be going wrong with the URL/local URL. As I say, I am relatively new/inexperienced with Swift - could you please provide some example code to demonstrate how to do this? I would also like to combine several CSV’s into one big CSV. How can I do this using TabularData? Thanks
Topic: Programming Languages SubTopic: Swift Tags:
Nov ’22