How do I insert a list of values into individual rows using python?
Time dilation for a moving electronic clock
Does splitting a potentially monolithic application into several smaller ones help prevent bugs?
What is the blue range indicating on this manifold pressure gauge?
Does the Bracer of Flying Daggers benefit from the Dueling Fighting style?
Co-worker team leader wants to inject the crap software product of his friends into our development. What should I say to our common boss?
What happens with multiple copies of Humility and Glorious Anthem on the battlefield?
Deleting missing values from a dataset
Why would a jet engine that runs at temps excess of 2000°C burn when it crashes?
Do f-stop and exposure time perfectly cancel?
What to do when during a meeting client people start to fight (even physically) with each others?
How could a female member of a species produce eggs unto death?
Should we release the security issues we found in our product as CVE or we can just update those on weekly release notes?
Excess Zinc in garden soil
How to deal with a cynical class?
It's a yearly task, alright
Is it illegal in Germany to take sick leave if you caused your own illness with food?
Is all copper pipe pretty much the same?
How do anti-virus programs start at Windows boot?
Is it ok to include an epilogue dedicated to colleagues who passed away in the end of the manuscript?
How is the Swiss post e-voting system supposed to work, and how was it wrong?
What wound would be of little consequence to a biped but terrible for a quadruped?
Is having access to past exams cheating and, if yes, could it be proven just by a good grade?
Counter-example to the existence of left Bousfield localization of combinatorial model category
Latest web browser compatible with Windows 98
How do I insert a list of values into individual rows using python?
I have a dataset that contains a field with a range of numbers (e.g. 1, 2, 3-6) as well as other fields. I've used python to expand the range field into discrete numbers (e.g. 1, 2, 3, 4, 5, 6) stored in a list in python. I would like to insert rows (6 in this example) with the range values. The values from the other fields would be copied for each new row, for each row in the table.
Row Example
| A | 1, 2, 3-6 | xxa | xxb |
to
| A | 1 | xxa | xxb |
| A | 2 | xxa | xxb |
| A | 3 | xxa | xxb |
| A | 4 | xxa | xxb |
| A | 5 | xxa | xxb |
| A | 6 | xxa | xxb |
arcpy python attribute-table cursor
New contributor
add a comment |
I have a dataset that contains a field with a range of numbers (e.g. 1, 2, 3-6) as well as other fields. I've used python to expand the range field into discrete numbers (e.g. 1, 2, 3, 4, 5, 6) stored in a list in python. I would like to insert rows (6 in this example) with the range values. The values from the other fields would be copied for each new row, for each row in the table.
Row Example
| A | 1, 2, 3-6 | xxa | xxb |
to
| A | 1 | xxa | xxb |
| A | 2 | xxa | xxb |
| A | 3 | xxa | xxb |
| A | 4 | xxa | xxb |
| A | 5 | xxa | xxb |
| A | 6 | xxa | xxb |
arcpy python attribute-table cursor
New contributor
add a comment |
I have a dataset that contains a field with a range of numbers (e.g. 1, 2, 3-6) as well as other fields. I've used python to expand the range field into discrete numbers (e.g. 1, 2, 3, 4, 5, 6) stored in a list in python. I would like to insert rows (6 in this example) with the range values. The values from the other fields would be copied for each new row, for each row in the table.
Row Example
| A | 1, 2, 3-6 | xxa | xxb |
to
| A | 1 | xxa | xxb |
| A | 2 | xxa | xxb |
| A | 3 | xxa | xxb |
| A | 4 | xxa | xxb |
| A | 5 | xxa | xxb |
| A | 6 | xxa | xxb |
arcpy python attribute-table cursor
New contributor
I have a dataset that contains a field with a range of numbers (e.g. 1, 2, 3-6) as well as other fields. I've used python to expand the range field into discrete numbers (e.g. 1, 2, 3, 4, 5, 6) stored in a list in python. I would like to insert rows (6 in this example) with the range values. The values from the other fields would be copied for each new row, for each row in the table.
Row Example
| A | 1, 2, 3-6 | xxa | xxb |
to
| A | 1 | xxa | xxb |
| A | 2 | xxa | xxb |
| A | 3 | xxa | xxb |
| A | 4 | xxa | xxb |
| A | 5 | xxa | xxb |
| A | 6 | xxa | xxb |
arcpy python attribute-table cursor
arcpy python attribute-table cursor
New contributor
New contributor
New contributor
asked 47 secs ago
rrrrrrrrrrrrrrrr
1
1
New contributor
New contributor
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "79"
};
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
});
}
});
rrrrrrrr is a new contributor. Be nice, and check out our Code of Conduct.
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%2fgis.stackexchange.com%2fquestions%2f315444%2fhow-do-i-insert-a-list-of-values-into-individual-rows-using-python%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
rrrrrrrr is a new contributor. Be nice, and check out our Code of Conduct.
rrrrrrrr is a new contributor. Be nice, and check out our Code of Conduct.
rrrrrrrr is a new contributor. Be nice, and check out our Code of Conduct.
rrrrrrrr is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Geographic Information Systems 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.
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%2fgis.stackexchange.com%2fquestions%2f315444%2fhow-do-i-insert-a-list-of-values-into-individual-rows-using-python%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