Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have to save the cleaned csv file directly from python script to a qvd.
The csv file can be transformed from Qlik ,however user requires it from python itself
This is the code used to convert file to csv in python.
I want to store this final_dataframe file as qvd in python itself.
df_final.to_csv(r'D:\pythontoqlik\custom import files\final_dataframe.csv')
AFAIK it's not possible - only Qlik could store data as a qvd because it's a special file-format.
- Marcus
it is possible, to store data into QVD format using Python, you can utilize the PyQvd library. This library provides functionalities to interact with Qlik View Data (QVD) files.
Install using pip
pip install PyQvd
Storing Data to QVD
import pandas as pd
from pyqvd import QvdTable
# Create a sample Pandas DataFrame
data = {
'Column1': [1, 2, 3],
'Column2': ['A', 'B', 'C'],
'Column3': [True, False, True]
}
df = pd.DataFrame(data)
# Convert the Pandas DataFrame to a QvdTable object
qvd_table = QvdTable.from_pandas(df)
# Store the QvdTable object to a QVD file
qvd_table.to_qvd('output.qvd')
print("Data successfully stored to output.qvd")
Regards
Jay