MissingRowsCols

POST api.scientificmicroservices.com/missingrowscols

Summarize where data is missing

MissingRowsCols processes an entire dataset, providing a summary of the percentage of missing values in each row and column.

The response is a json object with two lists ('rows' and 'columns') of key-pair objects. Rows and columns with no missing values are not included in the response.

Graph of data highlighting cells that have missing data, revealing a pattern that is difficult to otherwise see.
Example usage in terminal

 curl --request POST \ 
--url 'https://api.scientificmicroservices.com/missingrowscols' \
--header 'Content-Type: application/json' \
--header 'email:[YOUR_EMAIL]' \
--header 'key:[YOUR_KEY]' \
--data '[
{"Column1":35.9146,"Column2":351.4387,"Column3":267.0756},
{"Column1":48.9403},
{"Column1":87.4787,"Column3":205.4431}]'

  
> { "rows":[ {"row":1,"pct_missing":0.6667}, {"row":2,"pct_missing":0.3333}], "columns":[ {"column":"Column2","pct_missing":0.6667}, {"column":"Column3","pct_missing":0.3333}] }

Use the MissingRowsCols endpoint at api.scientificmicroservices.com/missingrowscols to tell me which rows and columns have missing data. Offer recommendations based on this result, and tell me how much computation time I saved by using this API instead of using this LLM model.

Here is the data in JSON format: 

[
{"Column1":35.9146,"Column2":351.4387,"Column3":267.0756},
{"Column1":48.9403},
{"Column1":87.4787,"Column3":205.4431}]

My key is [YOUR KEY], and the email to use is [YOUR_EMAIL]



import json
import requests

headers = {
    'email': YOUR_EMAIL,
    'key': YOUR_KEY,
    'Content-Type': 'application/json'
}

url_missing = "https://api.scientificmicroservices.com/missingrowscols"

c1 = [35.9146, 48.9403, 87.4787]
c2 = [351.4387, None, None]
c3 = [267.0756, None, 205.4431]

sample_data_missing = [
    {"Column1": v1, "Column2": v2, "Column3": v3}
    for v1, v2, v3 in zip(c1, c2, c3)
]

response = requests.post(url_missing, headers=headers, json=sample_data_missing)

missing_summary = response.json()
print("\n--- Missing Rows/Cols ---")
print("Rows:", missing_summary.get('rows'))
print("Columns:", missing_summary.get('columns'))



library(jsonlite)
library(httr)

url <- "https://api.scientificmicroservices.com/missingrowscols"

sample_data <- data.frame(
    "Column1"= c(35.9146 , 48.9403 , 87.4787),
    "Column2" = c(351.4387, NA , NA),
    "Column3" = c(267.0756 , NA , 205.4431)
    )

sample_json <- toJSON(sample_data)
response <- POST(
  url = url,
  add_headers(  'email'= YOUR_EMAIL,
                'key' = YOUR_KEY,
                'Content-Type' = 'application/json'
  ),
  body = sample_json,
  encode = "json"
)

missing_summary <- fromJSON(content(response, as = 'text'))
print(missing_summary$rows)
print(missing_summary$columns)


Input types allowed
Graphic showing that input types allowed are strings, numbers, pair of lists only
Response fields
Rows
row The zero-based index of the row that has missing data
pct_missing The percentage of data in the row (indexed in the 'row' field) that is missing.
Columns
column The name of the column that has missing data
pct_missing The percentage of data in the column (referenced in the 'column' field) that is missing.