Extracting data and saving data from hdf5 Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Moderator Election Q&A - Questionnaire 2019 Community Moderator Election ResultsNetwork analysis classic datasetsAmalgamating multiple datasets with different variables codingTools to perform SQL analytics on 350TB of csv dataPeriodically executing a scraping script with PythonPlot RDD data using a pyspark dataframe from csv fileCan HDF5 be reliably written to and read from simultaneously by separate python processes?How to deal with large data setsHow to download images and bounding boxes from imageNet?How to use same encode label with same value used in trainingFeature name extraction directly from dataset
Is there any avatar supposed to be born between the death of Krishna and the birth of Kalki?
Diagram with tikz
ListPlot join points by nearest neighbor rather than order
Do I really need recursive chmod to restrict access to a folder?
Is the Standard Deduction better than Itemized when both are the same amount?
If a contract sometimes uses the wrong name, is it still valid?
Were Kohanim forbidden from serving in King David's army?
Is the argument below valid?
3 doors, three guards, one stone
Is it ethical to give a final exam after the professor has quit before teaching the remaining chapters of the course?
What's the purpose of writing one's academic bio in 3rd person?
What are the possible ways to detect skin while classifying diseases?
How do I keep my slimes from escaping their pens?
Latex gives error undefined control sequence table
Why is "Captain Marvel" translated as male in Portugal?
Why are there no cargo aircraft with "flying wing" design?
Why don't the Weasley twins use magic outside of school if the Trace can only find the location of spells cast?
Does surprise arrest existing movement?
Do you forfeit tax refunds/credits if you aren't required to and don't file by April 15?
Antler Helmet: Can it work?
If 'B is more likely given A', then 'A is more likely given B'
What would be the ideal power source for a cybernetic eye?
Withdrew £2800, but only £2000 shows as withdrawn on online banking; what are my obligations?
Why is black pepper both grey and black?
Extracting data and saving data from hdf5
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Moderator Election Q&A - Questionnaire
2019 Community Moderator Election ResultsNetwork analysis classic datasetsAmalgamating multiple datasets with different variables codingTools to perform SQL analytics on 350TB of csv dataPeriodically executing a scraping script with PythonPlot RDD data using a pyspark dataframe from csv fileCan HDF5 be reliably written to and read from simultaneously by separate python processes?How to deal with large data setsHow to download images and bounding boxes from imageNet?How to use same encode label with same value used in trainingFeature name extraction directly from dataset
$begingroup$
I have a hdf5 file, and I want to extract a part of the data and save it as the same format.
The data type is
DATATYPE H5T_IEEE_F32BE
So far I have successfully extracted the data using h5dump but it is in ascii format. I couldn't save it as the same hdf5 format. I saw there are several flags for saving as xml formats, but it doesn't work for me. I have tried using flags like -x or -d such as
h5dump -d variable -s 1 10 -X output.file input.file
It creates the output file, but it is an empty file.
edit: I need to do it using h5dump.
dataset
$endgroup$
add a comment |
$begingroup$
I have a hdf5 file, and I want to extract a part of the data and save it as the same format.
The data type is
DATATYPE H5T_IEEE_F32BE
So far I have successfully extracted the data using h5dump but it is in ascii format. I couldn't save it as the same hdf5 format. I saw there are several flags for saving as xml formats, but it doesn't work for me. I have tried using flags like -x or -d such as
h5dump -d variable -s 1 10 -X output.file input.file
It creates the output file, but it is an empty file.
edit: I need to do it using h5dump.
dataset
$endgroup$
add a comment |
$begingroup$
I have a hdf5 file, and I want to extract a part of the data and save it as the same format.
The data type is
DATATYPE H5T_IEEE_F32BE
So far I have successfully extracted the data using h5dump but it is in ascii format. I couldn't save it as the same hdf5 format. I saw there are several flags for saving as xml formats, but it doesn't work for me. I have tried using flags like -x or -d such as
h5dump -d variable -s 1 10 -X output.file input.file
It creates the output file, but it is an empty file.
edit: I need to do it using h5dump.
dataset
$endgroup$
I have a hdf5 file, and I want to extract a part of the data and save it as the same format.
The data type is
DATATYPE H5T_IEEE_F32BE
So far I have successfully extracted the data using h5dump but it is in ascii format. I couldn't save it as the same hdf5 format. I saw there are several flags for saving as xml formats, but it doesn't work for me. I have tried using flags like -x or -d such as
h5dump -d variable -s 1 10 -X output.file input.file
It creates the output file, but it is an empty file.
edit: I need to do it using h5dump.
dataset
dataset
edited Apr 2 at 8:40
atrlrgn
asked Apr 1 at 16:01
atrlrgnatrlrgn
62
62
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
You can always try using the h5py module in Python.
import h5py
# Load existing file
filename = "myfile.hdf5"
dataset = h5py.File(filename, "r")
# Show keys
[print(item) for item in dataset.items()]
# Assuming that you want to select the first 10 rows of key "A"
data = dataset["A"][:10]
dataset.close()
# Create the new dataset / file
dataset2 = h5py.File("myfile2.hdf5", "w")
dataset2.create_dataset("A", data)
dataset2.close()
$endgroup$
$begingroup$
thank you for your answer, but unfortunately I cannot use python at the moment. I need to do it using h5dump. It wasn't very clear in the question, I'll edit it.
$endgroup$
– atrlrgn
Apr 2 at 8:40
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "557"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f48362%2fextracting-data-and-saving-data-from-hdf5%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
You can always try using the h5py module in Python.
import h5py
# Load existing file
filename = "myfile.hdf5"
dataset = h5py.File(filename, "r")
# Show keys
[print(item) for item in dataset.items()]
# Assuming that you want to select the first 10 rows of key "A"
data = dataset["A"][:10]
dataset.close()
# Create the new dataset / file
dataset2 = h5py.File("myfile2.hdf5", "w")
dataset2.create_dataset("A", data)
dataset2.close()
$endgroup$
$begingroup$
thank you for your answer, but unfortunately I cannot use python at the moment. I need to do it using h5dump. It wasn't very clear in the question, I'll edit it.
$endgroup$
– atrlrgn
Apr 2 at 8:40
add a comment |
$begingroup$
You can always try using the h5py module in Python.
import h5py
# Load existing file
filename = "myfile.hdf5"
dataset = h5py.File(filename, "r")
# Show keys
[print(item) for item in dataset.items()]
# Assuming that you want to select the first 10 rows of key "A"
data = dataset["A"][:10]
dataset.close()
# Create the new dataset / file
dataset2 = h5py.File("myfile2.hdf5", "w")
dataset2.create_dataset("A", data)
dataset2.close()
$endgroup$
$begingroup$
thank you for your answer, but unfortunately I cannot use python at the moment. I need to do it using h5dump. It wasn't very clear in the question, I'll edit it.
$endgroup$
– atrlrgn
Apr 2 at 8:40
add a comment |
$begingroup$
You can always try using the h5py module in Python.
import h5py
# Load existing file
filename = "myfile.hdf5"
dataset = h5py.File(filename, "r")
# Show keys
[print(item) for item in dataset.items()]
# Assuming that you want to select the first 10 rows of key "A"
data = dataset["A"][:10]
dataset.close()
# Create the new dataset / file
dataset2 = h5py.File("myfile2.hdf5", "w")
dataset2.create_dataset("A", data)
dataset2.close()
$endgroup$
You can always try using the h5py module in Python.
import h5py
# Load existing file
filename = "myfile.hdf5"
dataset = h5py.File(filename, "r")
# Show keys
[print(item) for item in dataset.items()]
# Assuming that you want to select the first 10 rows of key "A"
data = dataset["A"][:10]
dataset.close()
# Create the new dataset / file
dataset2 = h5py.File("myfile2.hdf5", "w")
dataset2.create_dataset("A", data)
dataset2.close()
answered Apr 1 at 16:22
pcko1pcko1
1,681418
1,681418
$begingroup$
thank you for your answer, but unfortunately I cannot use python at the moment. I need to do it using h5dump. It wasn't very clear in the question, I'll edit it.
$endgroup$
– atrlrgn
Apr 2 at 8:40
add a comment |
$begingroup$
thank you for your answer, but unfortunately I cannot use python at the moment. I need to do it using h5dump. It wasn't very clear in the question, I'll edit it.
$endgroup$
– atrlrgn
Apr 2 at 8:40
$begingroup$
thank you for your answer, but unfortunately I cannot use python at the moment. I need to do it using h5dump. It wasn't very clear in the question, I'll edit it.
$endgroup$
– atrlrgn
Apr 2 at 8:40
$begingroup$
thank you for your answer, but unfortunately I cannot use python at the moment. I need to do it using h5dump. It wasn't very clear in the question, I'll edit it.
$endgroup$
– atrlrgn
Apr 2 at 8:40
add a comment |
Thanks for contributing an answer to Data Science Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f48362%2fextracting-data-and-saving-data-from-hdf5%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown