home / pelican

content

1 row where author = "ryan" and "published_date" is on date 2020-03-28

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: published_date (date)

slug ▼ author category content published_date summary title url
using-python-to-check-for-file-changes-in-excel ryan technology ## The Problem Data exchange in healthcare is ... harder than it needs to be. Not all partners in the healthcare arena understand and use technology to its fullest benefit. Take for example several health plans which want data reported to them for CMS (Centers for Medicare and Medicaid Services) regulations. They will ask their 'delegated' groups to fill out an excel file. As in, they expect you will _actually_ fill out an excel file, either by manually entering the data OR by potentially copying and pasting your data into their excel file. They will also, quite frequently, change their mind on what they want AND the order in which they want the data to appear in their excel file. But there's no change log to tell you what (if anything has changed). All that you will get is an email which states, "Here's the new template to be used for report XYZ" ... even if this 'new' report is the same as the last one that was sent. Some solutions might be to use versioning software (like Git) but all they will do is tell you that there is a difference, not _what_ the difference is. For example, when looking at a simple excel file added to git and using `git diff` you see: diff --git a/Book3.xlsx b/Book3.xlsx index 05a8b41..e96cdb5 100644 Binary files a/Book3.xlsx and b/Book3.xlsx differ This has been a giant pain in the butt for a while, but with the recent shelter-in-place directives, I have a bit more time on the weekends to solve these kinds of problems. ## The Solution Why Python of Course! Only two libraries are needed to make the comparison: (1) os, (2) pandas The basic idea is to: 1. Load the files 2. use pandas to compare the files 3. write out the differences, if they exist ### Load the Files The code below loads the necessary libraries, and then loads the excel files into 2 pandas dataframes. One thing that my team has to watch out for are tab names that have leading spaces that aren't easy to see inside of excel. This can cause all sorts of nightmares from a troubleshoo… 2020-03-28 ## The Problem Data exchange in healthcare is ... harder than it needs to be. Not all partners in the healthcare arena understand and use technology to its fullest benefit. Take for example several health plans which want data reported to them for CMS (Centers for Medicare and Medicaid Services) regulations. They … Using Python to Check for File Changes in Excel https://www.ryancheley.com/2020/03/28/using-python-to-check-for-file-changes-in-excel/

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [content] (
   [author] TEXT,
   [category] TEXT,
   [content] TEXT,
   [published_date] TEXT,
   [slug] TEXT PRIMARY KEY,
   [summary] TEXT,
   [title] TEXT,
   [url] TEXT
);
Powered by Datasette · Queries took 11.83ms