I'm trying to pull a single value back from a MSSQL DB, the code looks like:
import pandas as pd
import pypyodbc
query = 'SELECT TOP(1) value FROM [dbo].[table]'
connection = pypyodbc.connect(...)
df = pd.read_sql_query(query, connection)
But this returns a dataframe object, is there a method to instead just return a single string value, possibly without Pandas. Key priority being speed. Is there a quicker way generally of connecting/querying?