postgresql,heroku,import,copy,export
Building on my comment about to/from stdout/stdin, and answering the actual question about including multiple tables in one file; you can construct the output file to interleave copy ... from stdin with actual data and load it via psql. For example, psql will support input files that look like this:...
This is purely an issue related to Kafka setting. In the setting, there is a commented setting: advertised.host.name=something just need to replace "something" to the IP address of the server in which Kafka is running. This is found at Kafka - Unable to send a message to a remote server...
python,c++,templates,boost,export
After a while, I found a solution and figured this might be interesting for others as well. Solution It is actually pretty easy: The boost::python::class_ definition returns (of course) a class instance of type boost::python::class_< TheClass >. This can be stored, so we can add member definitions to it later:...
java,excel,export,export-to-excel
You can have a look at the following libraries http://poi.apache.org/ http://jexcelapi.sourceforge.net/...
Adjust your lower_case_table_names setting for MySQL to achieve your goal. See How to force case sensitive table names?
php,csv,download,export,fputcsv
Try like that you can get your result. <?php $database = new PDO('mysql:host=localhost;dbname=DB_Name', "root", ""); header('Content-Type: text/csv; charset=utf-8'); header('Content-Disposition: attachment; filename=data.csv'); $sql = "SELECT Card_ID, Card_UID, Card_Type FROM cards"; $stmt = $database->prepare($sql); $stmt->execute(); $data = fopen('php://output', 'w'); while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { fputcsv($data, $row); } fclose($data); ?>...
I would not recommend doing this using Java, but with 'mysqldump' tool (provided with MySQL) instead (more info on mysqldump). Anyway, if you really want to do this with java, you can invoke 'mysqldump' in Java with Runtime().getRuntime().exec("..."), or preferably with some libraries like Apache Commons Exec....
Does not seem so. Quote from ECMAScript 6 modules: the final syntax: You may be wondering – why do we need named exports if we could simply default-export objects (like CommonJS)? The answer is that you can’t enforce a static structure via objects and lose all of the associated advantages...
The maximum size of this list is fixed at 5 in the code (constant COMBO_HISTORY_LENGTH in org.eclipse.ui.dialogs.WizardDataTransferPage which is the base class for the org.eclipse.jdt.internal.ui.jarpackagerfat.FatJarPackageWizardPage which provides the Runnable Jar export wizard page).
mysql,import,export,comments,mysql-workbench
I created multiple line Persian comment in workstation that added an infected character in the commands. This is the generated code: And this weird character generated sql error :)...
background,export,html5-video,adobe-premiere
Obviously you want a low average bit rate. Things that can help with that are: keep the resolution low (you can scale it up a bit on the client); use H.264 High Profile (for the H.264 version); use 2-pass encoding; use variable bit rate. You can try increasing the GOP...
How about simply: XSLT 1.0 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:strip-space elements="*"/> <!-- identity transform --> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> <xsl:template match="SERIE | K1 | K3 | K46"> <xsl:copy> <xsl:value-of select="substring-before(.,'T')" />...
I believe the dump command just outputs to the console, so you need to redirect the output. Something like: Neo4jShell.bat -c "dump match (n:People)-[:Shared]-(m) return n,m;" > social.connection.db\test2.cql Edited with the Windows version of the command For UNIX systems a similar command works: neo4j-shell -c "dump match (n:People)-[:Shared]-(m) return n,m;"...
Well, CSV stands for comma separated values, if you open up your generated file through note pad you will have a real look what those data really looks like and you will have an idea on what your asking for. to insert empty row you just do "","","","" To insert...
The repeated mysql_fetch_array calls in the HTML generating while loop will consume all of the rows, leaving the internal result pointer at the end when finished. Therefore, when you try another mysql_fetch_array on the same result, already being at the end of the result, you will not receive any (more)...
java,mongodb,cassandra,export,storm
Without knowing your full requirement, amount of inserts/updates one cannot predict is it a good or bad approach. Mongo is less preferable for heavy writes but it can support quite a good no. of inserts. So important thing is how many writes you have per unit time and based on...
Unchecking "Include app symbols for your application to receive symbolicated crash logs from Apple" seems to fix it.
javascript,highcharts,export,png
The legend.style option is Deprecated in new versions and maybe that's why it doesn't work. You can use legend.itemStyle instead: legend: { enabled:true, itemStyle: {fontFamily: "Arial", fontSize: '8px'} } Here's the DEMO....
There are a number of options: You can just open two neo4j databases in your java copy and use the Java API to transfer nodes and relationships from one to another. On low level for initial seeding you can do the same with batch-inserter-apis, like I did here: https://github.com/jexp/store-utils/tree/21 you...
The simplest way I know of would be to create a template excel workbook with your desired style already applied, then use DDE to fill in the data ranges with the values from a matching SAS dataset. There are many resources that document how to do this.
Once in Excel you can use Text to Columns with space as the delimiter to parse the single cells into multiple cells. Having done so you might choose to save the result as character separated values, should you prefer the .csv format.
javascript,requirejs,export,ecmascript-6
(As so often) this is is jshint's fault. The line is indeed valid, ES6 Export syntax does permit the use of any IdentifierName - which includes keywords such as default - for the exported name of an ExportClause. I would however discourage from using it. Default exports are much easier...
asp.net,vb.net,pdf,crystal-reports,export
Probably the response ends after the first one, therefore there's no response to write to for the 2nd and 3rd attempts. Instead, you can have the client download the reports via AJAX Request (move your report generation into an .ashx generic handler), or have the user click the button 3...
magento,import,export,magento-1.9,magento-1.9.1
Try multiselect attributes with below format [data][space][comma][space][data][space]... So for your example: 13 , 14 ...
You can try that ... A link to trigger the dowload: <a href="#" download="MyTracks.gpx" id="exportGPX">Export to file</a> Some javascript (you have to include jquery): $("#exportGPX").on('click', function (event) { // prepare the string that is going to go into the href attribute // data:mimetype;encoding,string data = 'data:application/javascript;charset=utf-8,' + encodeURIComponent(gpxData); // set...
Maybe you need to create a THREE.OBJExporter object first. var material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); var mesh = new THREE.Mesh( totalGeom, material ); var exporter = new THREE.OBJExporter(); exporter.parse( mesh ); ...
I found this tool. It works incredibly well for extracting content of any type out of any sort of LOB to a file type (HTML in this case). Takes about an hour to do 200,000 records though...
You could try the zipline gem. It claims to be "Hacks on Hacks on Hacks" so heads up! Looks very easy to use though, worth a shot.
c#,sql-server,csv,header,export
You can use reader.GetName() to fetch the column names. SqlDataReader reader = sqlCmd.ExecuteReader(); using (System.IO.StreamWriter file = new System.IO.StreamWriter(outCsvFile)) { file.WriteLine(reader.GetName(0) + ',' + reader.GetName(1) + ',' + reader.GetName(2) + ',' + reader.GetName(3) + ',' + reader.GetName(4) + ',' + reader.GetName(5)); while (reader.Read()) file.WriteLine(reader[0].ToString() + ',' + reader[1].ToString() + ','...
linux,path,export,global-variables,environment-variables
Yes, many a times that's the problem with doing export PATH. You should append the environment variable directly into your .bash_profile file! This will be permanent and solve your purpose,thereby, making your package used globally without any further problem with the package's path. Append the following to the end of...
Try: header("Content-Disposition: attachment; filename=\"AutoDesk Inc.csv\""); ...
so after trying to format data in Access. I figured out it not posible, because export to xml using only raw data. After all i used this transformation and it work well. YOu can use it in detail settings of export. <xsl:template match="*"> <xsl:param name="parentElm"> <xsl:value-of select="name(..)" /> </xsl:param> <xsl:choose>...
ios,sqlite,export,mfmailcomposeviewcontroll
Turns out I was searching in the wrong directory. NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentationDirectory, NSUserDomainMask, YES); should be: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); ...
php,numbers,export,number-formatting
The second parameter defines whether var_export will return its representation of the value, or echo it directly. Look at this example: $x = array(1); $r_false = var_export($x, false); // array ( 0 => 1, ) $r_true = var_export($x, true); // **nothing is printed** var_export($r_false); // NULL var_export($r_true); // 'array (...
For export the table's data- SELECT CONCAT('"col1"="',col1,'","col2"="',col2,'","amount"="',amount,'","created"="',DATE_FORMAT(created,'%d/%m/%Y'),'"') t FROM test_tbl INTO OUTFILE '/tmp/test.txt' CHARACTER SET latin1 FIELDS ENCLOSED BY '' LINES TERMINATED BY '\r\n'; For import the table from csv mysql> CREATE TABLE `test_tbl` ( -> `col1` varchar(100) DEFAULT NULL, -> `col2` varchar(100) DEFAULT NULL, -> `amount` int DEFAULT NULL,...
c#,.net,excel,export,export-to-excel
Your code is not generating an Excel file, it is generating a CSV file. When you say it write all of the content on one row it may be because of regional settings using (, instead of ;) as separators. Now back to your question, to generate an Excel file...
Assuming you put your code in a class module called Class1, you create an instance in your main code like this... Dim myClass1 as Class1 Set myClass1 = New Class1 Class1.ScreenUpdating = False EDIT: Just use the code as it was originally written: no need to add anything. The bad...
Your best bet is probably to transpose your data and analyze it that way due to Excel's limits. write.csv(t(OAS_data), "Some Path") ...
asynchronous,export,google-bigquery,google-cloud-storage,callblocking
Partial exports are possible if the job fails for some reason mid-way through execution. If the job is in the DONE state, and there are no errors in the job, then all the data has been exported. I recommend waiting a bit before polling for job done -- you can...
java,excel,export,export-to-csv
Most simple way would be to read all the rows from JTable and create a excel file using POI library. You can get the table data using below method which you can store in list or something : table.getModel().getValueAt(rowIndex, columnIndex); Now to create excel file you can use below code...
Firstly, in your example, you are missing some quotes around the fullstop in the last line of your code, but I suspect this is just a typo, because it still probably wouldn't work. You'd need to double quote it like this: objshell.run "cmd /c echo. > ""c:\Users\%username%\Desktop\" & name &"."...
mysql,amazon-web-services,amazon-ec2,export,amazon-rds
Sure. Take the dump from the remote RDS Server: mysqldump -h rds.host.name -u remote_user_name -p remote_db > dump.sql When prompted for password, provide the password for user=remote_user_name (remote server) Upload it to your local mySql instance: mysql -u local_user_name -p local_db < dump.sql Also, if you own an ec2 server...
hadoop,export,hbase,bigdata,software-engineering
I would suggest to run a mapreduce job, with a full table scan and setTimerange, if want to split it by timestamp, and store the output as, for example an Avro files. Then you will be able to place those files on separate partitions. This can also help. Best of...
php,pdf,zend-framework,export,fpdf
Do you want FPDF::GetStringWidth? http://www.fpdf.org/en/doc/getstringwidth.htm...
If you want to handle exporting from Makefile, then try: $(NAME): $(OBJS) @export MY_ENV_VAR=my_value; \ $(CXX) -o $(NAME) $(OBJS) $(CXXFLAGS) $(LDFLAGS) Exporting will only work if called in the same subshell with the command itself. However, this solution is not going to work for LD_LIBRARY_PATH, because your intention is to...
echo "scan 'Employee',{COLUMNS=>'EmployeeInfo:Name'}" | hbase shell | grep "^ " > EmplyeeExport.txt This command might be helpful to you.... in above Employee is a table and EmployeeInfo is column family....
I would post this as a comment, but my reputation does not allow. Can you not just add a blank main method?...
objective-c,xcode,export,generator
Open Xcode, create a new project, choose Single View Application (or something that best suits what you'll be generating) click create. Go to the directory where this project was created, zip it and include it in the project for the App that will do the generating. When it's time...
Welcome to Stack Overflow Noctifer. While using PrintWriter class, you need to ensure that you flush and close it so that it releases all its resources, as it is not automatically flushed. In your code right now, since it is not closed so the changes are not being saved. The...
matlab,matrix,formatting,export,export-to-excel
This code provides the cell as required for xlswrite: M=[400 4.56 500 5.12 600 6.76 700 7.98 800 8.21 900 9.21 1000 10.12 1100 11.23 1200 12.43 1300 13.89 1400 14.54 1500 15.21 1600 16.23 1700 17.53 900 9.21 1000 10.12 1100 11.23 1200 12.43 1300 13.89 1400 14.54 1500...
hadoop,export,hbase,bigdata,software-engineering
Have you tried Hbase export http://hbase.apache.org/0.94/book/ops_mgt.html which will dump contents of Hbase table to HDFS from there you can use Pig and Hive to access it , I haven't tried this myself ... but appears to address your issue from the documentation .
Use Management Studio to generate the script. Right-click on the database in Object explorer, from context menu choose "tasks", then "generate scripts". In the dialog, select the tables you want the data scripted out from. On the next page set the destination, and click on the "advanced" button. There find...
import,module,export,typescript
Your code has two issues: a.) You are using internal modules wrong. You need to export for them to get added to the module. This is explained by David's answer. But more importantly and why this answer is here: b.) you don't need to use internal modules when working with...
In the second class, you would call try{ ClassA.Connect(); } catch(Exception e) { } Where ClassA is the name of the class where public static void Connect() is defined. Note that, by convention, the method name should begin with a lower case, so it should be public static void connect()....
I did the code for you, don't just copy this, try to learn with it :) // $source = file_get_contents($file); $source = 'Array ( [f_name] => YOKICHI [l_name] => KOSHIZAWA [name] => YOKICHI KOSHIZAWA [street_address] => 7164 fake [city] => CANTON [state] => MI [zip] => 48187 [country] => United...
Start your query after this: $db = new MySQLi("host", "username", "password", "db"); if(!$db) { die("your_error_msg" . mysqli_error($db)); } $db->set_charset("utf8");' EDIT <?php //ENTER THE RELEVANT INFO BELOW $mysqlDatabaseName ='xxxxxx'; $mysqlUserName ='xxxxxxx'; $mysqlPassword ='myPassword'; $mysqlHostName ='xxxxxxxx.net'; $mysqlExportPath ='chooseFilenameForBackup.sql'; //DO NOT EDIT BELOW THIS LINE //Export the database and output the status to...
Open the model in Blender and export it to Roblox's .mesh ==Edit== Sorry, I just pointed at some stuff that i thought would work, but when I tried it I noticed that the add-on was flawed (not much of it was working) so I edited it a bit (it is...
mysql,database,csv,export,export-to-csv
Sounds like you need a database. Luckily, 5GB is actually pretty small. Import it into MS Access. No need to spin up a database server yet.
oracle,oracle11g,export,ddl,dbms-scheduler
According to the documentation we have to use Data Pump to export DBMS_SCHEDULER objects: "An export generates the DDL that was used to create the Scheduler objects. All attributes are exported. When an import is done, all the database objects are recreated in the new database." Find out more about...
If you have a has_many relationship setup correctly, you will be able to access the name of a mission's first region using: mission.regions.first.name or outside your loop, you could return the region name of the first Mission using: Mission.first.regions.first.name If each mission is only supposed to have one region, you...
mysql,database,export,command-prompt
mysqldump -u root -p --all-databases > " D:\My Folder\Databases\mydatabase.sql" should do
The answer is simple, but hard to find if you don't know where to look. if you write the truth table into a variable, you can access the object ttwithin that variable for the corresponding data frame. The export shoud look like this: myTable <- truthtable(parameters.....) write.table(myTable$tt, file = "filename.txt",...
Did you use "select" type set_col_edittype? If so, it should display the alias value in export. $dg -> set_col_edittype("Dept", "select", "20:CSE;30:IT", false); Reference: http://phpgrid.com/documentation/set_col_edittype/...
apache,csv,cassandra,export,export-to-csv
The syntax of your original COPY command is also fine. The problem is with your column named timestamp, which is a data type and is a reserved word in this context. For this reason you need to escape your column name as follows: COPY product (uid, productcount, term, "timestamp") TO...
google-api,export,google-bigquery,google-cloud-storage
Here is a python snippet that will tell whether a table exists: def doesTableExist(project_id, dataset_id, table_id): bq.tables().delete( projectId=project_id, datasetId=dataset_id, tableId=table_id).execute() return False Alternately, if you'd prefer not deleting the table in the process, you could try: def doesTableExist(project_id, dataset_id, table_id): try: bq.tables().get( projectId=project_id, datasetId=dataset_id, tableId=table_id).execute() return True except HttpError, err...
Without a developer account, you can't. After you get your developer account, you have to create your Distribution Certificate and Ad Hoc Provisioning Profile based on the UDID collected from your friend's device. Alternatively, you can use TestFlight feature in iTunes Connect. Requires Developer Account as well....
You should probably go through a simple canvas tutorial. I suggest checking the Mozilla (mdn) tutorials. Canvas isn't very hard to work with. For a quick idea of what you will need, check out this tutorial about drawing a rectange and to save the image you can access the canvasElement.toDataURL()...
The closest you can get is by reverse engineering (use a debugger) to find the required memory size before calling a constructor, and maybe you could figure out what members are used for (as well as inheritance and other goodies), but you will definitely not have correct names for anything...
you are writing string after coming out from loop so that string whould be null, try out this code try { BufferedReader br = new BufferedReader( new FileReader("C:/Users/Sei_Erfolgreich/Desktop/convert.txt")); String zeile; try { File newTextFile = new File("C:/Users/Sei_Erfolgreich/Desktop/convert2.txt"); FileWriter fw = new FileWriter(newTextFile); while ((zeile = br.readLine()) != null) { zeile...
php,excel,google-spreadsheet,export
Instantiating a new PHPExcel object using $objPHPExcel = new PHPExcel(); only creates a PHPExcel object with a single worksheet (sheet #0). You're subsequently telling it to use a second sheet (sheet #1) when none yet exists: $objPHPExcel->getActiveSheet(1)->setTitle('SECOND SHEET'); Before doing that, you need to create a second worksheet in the...
email,outlook,google-spreadsheet,export
Yes, it is. You can develop an Outlook add-in, see Walkthrough: Creating Your First Application-Level Add-in for Outlook to get started. The NewMailEx event is fired once for every received item that is processed by Microsoft Outlook. The item can be one of several different item types, for example, MailItem,...
We could join the two dataset with 'ID', create a column that checks the condition ('indx'), and use dcast to convert from 'long' to 'wide' format library(data.table)#v1.9.5+ dcast(setkey(setDT(df), ID)[SubjectTestDate][, indx:=sum(TreatmentDate <=Testdate) , list(ID, Treatment)], ID+Testdate~ paste0('Treatment', Treatment), value.var='indx', length) # ID Testdate TreatmentAA TreatmentBB TreatmentCC TreatmentDD #1: 111 2012-12-31 1...
This question is off-topic, but IMHO Excel 2002/2003 XML Format would be the best choice in your circumstances. The reason for this is that the data in this format is typed - so you will not see numbers misinterpreted as dates, or phone numbers with leading zeros stripped. I am...
Can you only read Wavefront obj in your app ? This format does not include texture bitmap data. Only vertex positions, normals and texture coordinates. The materials are exported in *.mtl files (Material Template Library) that can reference textures to map on different objects declared inside the obj file. If...
How about a simple one: <xsl:template name="format-date"> <xsl:param name="dateParam"/> <xsl:param name="time" select="'T00:00:00.000'"/> <xsl:choose> <xsl:when test="not(string($dateParam))">place your default result for blank dates here</xsl:when> <xsl:otherwise> <!-- normalize separators to "/" --> <xsl:variable name="date" select="translate($dateParam, '.-', '//')"/> <!-- extract date elements --> <xsl:variable name="d" select="substring-before($date, '/')"/>...
The file name in your code matchMaker_MainScene.fxml does not match the name of the file MatchMaker_MainScene.fxml. This will work when you are reading from a file system that doesn't distinguish file names that differ only in case (such as windows) but will not work on file systems that do (everything...
Except for a few syntactical errors your code appears to be working as expected. I worry if you are having issues in Excel with you text import. I touched up your code a bit but it is functionally the same as what you had. $Data = Get-ChildItem -Path "C:\temp" -Recurse...
php,mysql,database,export,adminer
Per your comment on or original question: I want to export the database and import it in phpMyAdmin in my local environment to test and modify my client's website. You want to recreate the database and data in a new environment and you are exporting SQL. Therefore, you will want...
I suspect you have DOS line ending in your file that you can test with: cat -t file.sh That will show something like this: export dbHost=server01^M export dbName=someName^M To fix this issue run dos2unix on your file.sh....
javascript,html,excel,export,element
I will give you a hint for a lazy solution. On page load clone that div with cloneNode and keep it as a variable. When you need to do the export just export that reference (not the actual div). On the other hand, if you need to keep some other...
c#,xml,winforms,visual-studio-2012,export
If you want to export to XML add "using System.xml" then loop through your data as follow. using (XmlWriter writer = XmlWriter.Create("GiveNameToYourFile.xml")) { writer.WriteStartDocument(); writer.WriteStartElement("GiveTagNameToYourDocument"); foreach (proxy.ProjectData som in nc) { writer.WriteStartElement("GiveNameToYourElement"); writer.WriteElementString("ProjectTitle", som.ProjectTitle); writer.WriteElementString("ProjectID", som.ProjectID); writer.WriteElementString("PublishStatus", som.PublishStatus);...
export,pervasive,pervasive-sql
You should be able to use the Export Data function. Right click on the table name in the PCC and select Export Data. From there, you can either execute the standard "select * from " or make a more complex query to pull only the data you need. You can...
java,eclipse,export,runtime-packages
In each downstream plugin project you can add access rules via the Java Build Path: Go to the properties node Java Build Path > Libraries > Plug-in Dependencies > Access rules. When trying this approach please consult Combine Access Rules.
import,content-management-system,export,hybris
If you just want to play around and want to test something the "quick-and-dirty"-way you can use the cms cockpit. (not recommended) In our project we use only impex files for cms stuff. The main reasons for this approach are: your pages and components do not get lost when you...
try hdfs dfs -du -h /hbase/data/default/ (or /hbase/ depending on hbase version you use) This will show how much space is used by files of your tables. Hope that will help....
Do you mean like this? library(knitr) dfc[c(-1,-2)] <- signif(dfc[c(-1,-2)], digits = 4) dfc_str <- transmute(dfc, TRA, Comp1 = paste(meanComp1, " +/-", sdComp1), Comp2 = paste(meanComp2, " +/-", sdComp2), Comp3 = paste(meanComp3, " +/-", sdComp3)) kable(dfc_str) ...
linux,bash,shell,variables,export
When you run /tmp/example.bash &, you set the environment in the sub-shell, but that does not affect the parent shell that ran it. You need to (a) remove the sleep 1000 and (b) use the . command or (in Bash or a C shell) the source command to read the...
python,arrays,python-3.x,export
It looks like you need a simple case of saving on to a text file. json is probably easy to start off with. Try this: 1. Save the contents as json onto a text file 2. You may load the data back again and convert into json, which will work...
You can't do that with the EXPORT or COPY TO commands. To put data into multiple sheets in Excel, you need to use Automation. The fastest approach is probably to use EXPORT or COPY TO to create multiple workbooks, and then use Automation to consolidate the data into a single...
mysql,database,import,phpmyadmin,export
Answer in one word, No it won't be deleted. Not as PHPMyAdmin is configured by default at least.
c#,asp.net,csv,datatable,export
You can try: StringBuilder sb = new StringBuilder(); string[] columnNames = dt.Columns.Cast<DataColumn>(). Select(column => column.ColumnName). ToArray(); sb.AppendLine(string.Join("|", columnNames)); foreach (DataRow row in dt.Rows) { string[] fields = row.ItemArray.Select(field => field.ToString()). ToArray(); sb.AppendLine(string.Join("|", fields)); } File.WriteAllText("test.csv", sb.ToString()); ...
javascript,button,highcharts,export
As Sebastian showed in his example (I deleted a few unnecessary commands), no need to reinvent the wheel, but just to replace the default image is sufficient: exporting: { buttons: { contextButton: { symbol: 'url(http://geodev.grid.unep.ch/images/button_download.png)' } } } ...
python,class,parsing,export,scrapy
You are trying to use too broad of an Xpath expression for the first selection. Try it like this: def parse(self, response): revenue = response.xpath('//td[@align="right"]/strong/text()') items = [] for rev in revenue: item = DozenItem() item["Revenue"] = rev.re('\d*,\d*') items.append(item) return items[:3] ...