'Reading Excel sheet as string (pandas)
I have an Excel workbook with a SQL query and I am trying to read in the query as a string to be used in a SQL connect function. I have tried using pd.read_excel('Workbook.xlsx', dtype=str) but it still imports the SQL query as a dataframe of different lines of the query.
The finished result would just be a saved string, something like
query
"""
SELECT
table
FROM
database
"""
In summary, simply read Excel sheet as string and import to pandas.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
