Supporto per parquet JMP 18CIAO,
Ora che JMP 18 supporta Python, come posso convertire una tabella JMP direttamente nel formato file Apache Parquet senza doverla prima convertire in un file CSV?
JMP18
Oggetto: Supporto per parquet JMP 18Non ho familiarità con il formato parquet, ma questo sito mostra come scrivere file parquet da Python.
import pandas as pd
import pyarrow as pa
import pyarrow.parquet as pq
weather_schema = pa.schema([
('city', pa.string()),
('measurement_time', pa.timestamp('ms')),
('temperature', pa.float32()),
('atmospheric_pressure', pa.float32())
])
# Create a Pandas data frame with some sample weather data
df = pd.DataFrame({
'city': ['New York', 'London', 'Tokyo'],
'measurement_time': ['2022-05-01 12:00:00', '2022-05-01 12:00:00', '2022-05-01 12:00:00'],
'temperature': [20.5, 15.2, 23.1],
'atmospheric_pressure': [101.5, 99.2, 100.1]
})
# Convert the Pandas DataFrame to a PyArrow table
table = pa.Table.from_pandas(df, schema=weather_schema)
# Write the PyArrow table to a Parquet file
pq.write_table(table, 'test/weather_data.parquet')
https://saturncloud.io/blog/how-to-write-data-to-parquet-with-python/
Oggetto: Supporto per parquet JMP 18Il supporto dei file Parquet in JMP è stato menzionato durante la formazione JMP18 della scorsa settimana.
Oggetto: Supporto per parquet JMP 18Sì, in particolare tramite Python. Ho menzionato l'importazione dei dati dei file parquet come esempio del valore dell'integrazione di Python in JMP 18.
Oggetto: Supporto per parquet JMP 18Ok, ma sto chiedendo di esportare un file JMP in un formato file Parquet direttamente da JMP 18.
Oggetto: Supporto per parquet JMP 18Per esportare una tabella dati JMP in Parquet, dovresti utilizzare Python in modo simile all'esempio che ho mostrato sopra. JMP di per sé non supporta Parquet.
Re: Supporto Parquet JMP 18Capisco. Grazie.