Menu Close

problem bringing output rsyncrosim datasheets in Python pandas

Syncrosim Forums SyncroSim – General Questions and Answers problem bringing output rsyncrosim datasheets in Python pandas

Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #18320
    davidandersondavidanderson
    Participant

    I was testing out a process to bring output data sheets into Python using the rsyncrosim package. I ran into a bit of a glitch. For the data that I am working with there is no secondary or tertiary stratum identified. The data sheet returns a null column for the secondary stratum when retrieving the STSim_OutputStratum datasheet. It does this in both R and Python. R handles the dataframe just fine. In python the conversion from a R dataframe to a Pandas dataframe does not like the null valued column. The quick workaround was to define a dummy secondary stratum. Perhaps a better fix would be for the rsyncrosim datasheet function to not return a secondary stratum column if no secondary stratum are defined.

    #18364
    Colin DanielColin Daniel
    Keymaster

    Thanks for the feedback. Similar to the existing optional argument for the datasheet function in rsyncrosim, perhaps we could add a new withData boolean argument to give the option to only return columns that contain data?

    #18624
    davidandersondavidanderson
    Participant

    That sounds like a viable solution.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.